From 7d5b7f6488e6ba72f30f91281314689b8f370e1b Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Fri, 7 Jun 2024 20:15:54 -0400 Subject: [PATCH 1/4] upgrade: turbo (#986) Co-authored-by: dsinghvi --- .github/workflows/deploy-fdr-dev.yml | 8 +--- .github/workflows/deploy-fdr-prod.yml | 8 +--- .github/workflows/fdr-ete.yml | 4 +- package.json | 2 +- packages/fdr-sdk/turbo.json | 2 +- .../src/SnippetTemplateResolver.ts | 14 +++--- packages/template-resolver/tsconfig.json | 3 +- packages/template-resolver/turbo.json | 2 +- pnpm-lock.yaml | 44 +++++++++---------- servers/fdr/Dockerfile | 11 +++-- servers/fdr/package.json | 2 +- servers/fdr/scripts/run.sh | 5 +-- servers/fdr/turbo.json | 2 +- shared/.prettierignore | 1 + turbo.json | 2 +- 15 files changed, 47 insertions(+), 63 deletions(-) diff --git a/.github/workflows/deploy-fdr-dev.yml b/.github/workflows/deploy-fdr-dev.yml index 596c07f29e..f09fb24f0d 100644 --- a/.github/workflows/deploy-fdr-dev.yml +++ b/.github/workflows/deploy-fdr-dev.yml @@ -52,15 +52,9 @@ jobs: # which makes steps.has-changed.outputs.RESULT = 'true' run: npx turbo-ignore ${{ env.PACKAGE_NAME }} || echo "RESULT=true" >> $GITHUB_OUTPUT - - name: 🪴 Generate Fern SDKs - run: | - pnpm fern generate --local --api fdr --group local --log-level debug - env: - FERN_TOKEN: ${{ secrets.FERN_TOKEN }} - - name: 🧪 Build and test env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | pnpm turbo codegen build test --filter=${{ env.PACKAGE_NAME }} pnpm --filter "@fern-platform/fdr" sentry:sourcemaps diff --git a/.github/workflows/deploy-fdr-prod.yml b/.github/workflows/deploy-fdr-prod.yml index 7b202502bd..02e65c5605 100644 --- a/.github/workflows/deploy-fdr-prod.yml +++ b/.github/workflows/deploy-fdr-prod.yml @@ -41,12 +41,6 @@ jobs: - name: 📥 Install uses: ./.github/actions/install - - name: 🪴 Generate Code - run: | - pnpm fern generate --local --api fdr --group local --log-level debug - env: - FERN_TOKEN: ${{ secrets.FERN_TOKEN }} - - name: 🧪 Build and test run: pnpm turbo build test --filter=${{ env.PACKAGE_NAME }} @@ -97,4 +91,4 @@ jobs: healthchecks: needs: deploy_prod uses: ./.github/workflows/healthcheck.yml - secrets: inherit \ No newline at end of file + secrets: inherit diff --git a/.github/workflows/fdr-ete.yml b/.github/workflows/fdr-ete.yml index c86c19c5d2..4f1534df01 100644 --- a/.github/workflows/fdr-ete.yml +++ b/.github/workflows/fdr-ete.yml @@ -32,6 +32,4 @@ jobs: # TODO: re-enable when moving to turbo # pnpm turbo --filter= docker:local run: | - cd servers/fdr - pnpm run docker:local - pnpm run test:ete + pnpm --filter=@fern-platform/fdr docker:local test:ete diff --git a/package.json b/package.json index 21785cf24c..fe1c304fa3 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "tailwindcss": "^3.4.3", "ts-node": "^10.9.1", "tsx": "^4.7.1", - "turbo": "^1.12.5", + "turbo": "^2.0.1", "typescript": "5.4.3", "typescript-plugin-css-modules": "^5.1.0", "vitest": "^1.5.0" diff --git a/packages/fdr-sdk/turbo.json b/packages/fdr-sdk/turbo.json index cc807bcb92..a902298336 100644 --- a/packages/fdr-sdk/turbo.json +++ b/packages/fdr-sdk/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turbo.build/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "compile": { "outputs": ["dist/**"], "dependsOn": ["^build", "^compile", "codegen"] diff --git a/packages/template-resolver/src/SnippetTemplateResolver.ts b/packages/template-resolver/src/SnippetTemplateResolver.ts index 3c49058768..a3c86900db 100644 --- a/packages/template-resolver/src/SnippetTemplateResolver.ts +++ b/packages/template-resolver/src/SnippetTemplateResolver.ts @@ -40,7 +40,7 @@ export class SnippetTemplateResolver { private accessParameterPayloadByPath( parameterPayloads?: ParameterPayload[], - locationPath?: string + locationPath?: string, ): unknown | undefined { const splitPath = locationPath?.split(".") ?? []; const parameterName = splitPath.shift(); @@ -88,7 +88,7 @@ export class SnippetTemplateResolver { invocation: template.templateString.replace( // TODO: fix the typescript generator to create literals not as types TemplateSentinel, - "" + "", ), }; } @@ -118,7 +118,7 @@ export class SnippetTemplateResolver { invocation: template.templateString.replace( // TODO: fix the typescript generator to create literals not as types TemplateSentinel, - evaluatedInputs.map((input) => input.invocation).join(template.inputDelimiter ?? ", ") + evaluatedInputs.map((input) => input.invocation).join(template.inputDelimiter ?? ", "), ), } : undefined; @@ -143,7 +143,7 @@ export class SnippetTemplateResolver { imports: imports.concat(evaluatedInputs.flatMap((input) => input.imports)), invocation: template.containerTemplateString.replace( TemplateSentinel, - evaluatedInputs.map((input) => input.invocation).join(template.delimiter ?? ", ") + evaluatedInputs.map((input) => input.invocation).join(template.delimiter ?? ", "), ), }; } @@ -173,7 +173,7 @@ export class SnippetTemplateResolver { imports: imports.concat(evaluatedInputs.flatMap((input) => input.imports)), invocation: template.containerTemplateString.replace( TemplateSentinel, - evaluatedInputs.map((input) => input.invocation).join(template.delimiter ?? ", ") + evaluatedInputs.map((input) => input.invocation).join(template.delimiter ?? ", "), ), }; } @@ -200,7 +200,7 @@ export class SnippetTemplateResolver { const maybeUnionValue = this.getPayloadValue( // Defaults to relative since the python generator didn't specify this on historical templates template.templateInput ?? { location: "RELATIVE" }, - payloadOverride + payloadOverride, ); if (maybeUnionValue == null || !isPlainObject(maybeUnionValue) || !(discriminator in maybeUnionValue)) { return undefined; @@ -219,7 +219,7 @@ export class SnippetTemplateResolver { const evaluatedMember: V1Snippet | undefined = this.resolveV1Template( selectedMemberTemplate, - payloadOverride + payloadOverride, ); return evaluatedMember != null ? { diff --git a/packages/template-resolver/tsconfig.json b/packages/template-resolver/tsconfig.json index 1a27b57a27..9a6c82205a 100644 --- a/packages/template-resolver/tsconfig.json +++ b/packages/template-resolver/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "@fern-platform/configs/tsconfig/library.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src" }, - "include": ["./src/**/*"], - "references": [{ "path": "../commons/core-utils" }] + "include": ["./src/**/*"] } diff --git a/packages/template-resolver/turbo.json b/packages/template-resolver/turbo.json index cc807bcb92..a902298336 100644 --- a/packages/template-resolver/turbo.json +++ b/packages/template-resolver/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turbo.build/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "compile": { "outputs": ["dist/**"], "dependsOn": ["^build", "^compile", "codegen"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4fbad4a970..cf185c4a25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -157,8 +157,8 @@ importers: specifier: ^4.7.1 version: 4.9.3 turbo: - specifier: ^1.12.5 - version: 1.13.4 + specifier: ^2.0.1 + version: 2.0.1 typescript: specifier: 5.4.3 version: 5.4.3 @@ -25481,64 +25481,64 @@ packages: engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: true - /turbo-darwin-64@1.13.4: - resolution: {integrity: sha512-A0eKd73R7CGnRinTiS7txkMElg+R5rKFp9HV7baDiEL4xTG1FIg/56Vm7A5RVgg8UNgG2qNnrfatJtb+dRmNdw==} + /turbo-darwin-64@2.0.1: + resolution: {integrity: sha512-GO391pUmI6c6l/EpUIaXNzwbVDWRvYahm5oLB176dAWRYKYO+Osqs/XBdOM0G3l7ZFdR6nUtRJc8qinJp7qDUQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.13.4: - resolution: {integrity: sha512-eG769Q0NF6/Vyjsr3mKCnkG/eW6dKMBZk6dxWOdrHfrg6QgfkBUk0WUUujzdtVPiUIvsh4l46vQrNVd9EOtbyA==} + /turbo-darwin-arm64@2.0.1: + resolution: {integrity: sha512-rmjJoxeq7nmH/F2aWKapahrDE2zE2Uc15rvs4Rz6qHOzSqC8R5uyLpQyTKIPIZ95O/z9nKfLfVPyiRENuk5vpw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.13.4: - resolution: {integrity: sha512-Bq0JphDeNw3XEi+Xb/e4xoKhs1DHN7OoLVUbTIQz+gazYjigVZvtwCvgrZI7eW9Xo1eOXM2zw2u1DGLLUfmGkQ==} + /turbo-linux-64@2.0.1: + resolution: {integrity: sha512-vwTOc4v4jm6tM+9WlsiDlN+zwHP8A2wlsAYiNqz2u0DZL55aCWaVdivh2VpVLN36Mr9HgREGH0Fw+jx6ObcNRg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.13.4: - resolution: {integrity: sha512-BJcXw1DDiHO/okYbaNdcWN6szjXyHWx9d460v6fCHY65G8CyqGU3y2uUTPK89o8lq/b2C8NK0yZD+Vp0f9VoIg==} + /turbo-linux-arm64@2.0.1: + resolution: {integrity: sha512-DkVt76fjwY940DfmqznWhpYIlKYduvKAoTtylkERrDlcWUpDYWwqNbcf9PRRIbnjnv9lIxvuom1KZmMY+cw/Ig==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.13.4: - resolution: {integrity: sha512-OFFhXHOFLN7A78vD/dlVuuSSVEB3s9ZBj18Tm1hk3aW1HTWTuAw0ReN6ZNlVObZUHvGy8d57OAGGxf2bT3etQw==} + /turbo-windows-64@2.0.1: + resolution: {integrity: sha512-XskV34kYuXVIHbRbgH8jr35Y8uA6kJOQ0LJStU4jFk7piiyk0a4n2GNDymMtvIwAxYdbuTe+pKuPCThFdirHBQ==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.13.4: - resolution: {integrity: sha512-u5A+VOKHswJJmJ8o8rcilBfU5U3Y1TTAfP9wX8bFh8teYF1ghP0EhtMRLjhtp6RPa+XCxHHVA2CiC3gbh5eg5g==} + /turbo-windows-arm64@2.0.1: + resolution: {integrity: sha512-R2/RmKr2uQxkOCtXK5LNxdD3Iv7lUm56iy2FrDwTDgPI7X7K6WRjrxdirmFIu/fABYE5n6EampU3ejbG5mmGtg==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.13.4: - resolution: {integrity: sha512-1q7+9UJABuBAHrcC4Sxp5lOqYS5mvxRrwa33wpIyM18hlOCpRD/fTJNxZ0vhbMcJmz15o9kkVm743mPn7p6jpQ==} + /turbo@2.0.1: + resolution: {integrity: sha512-sJhxfBaN14pYj//xxAG6zAyStkE2j4HI9JVXVMob35SGob6dz/HuSqV/4QlVqw0uKAkwc1lXIsnykbe8RLmOOw==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.13.4 - turbo-darwin-arm64: 1.13.4 - turbo-linux-64: 1.13.4 - turbo-linux-arm64: 1.13.4 - turbo-windows-64: 1.13.4 - turbo-windows-arm64: 1.13.4 + turbo-darwin-64: 2.0.1 + turbo-darwin-arm64: 2.0.1 + turbo-linux-64: 2.0.1 + turbo-linux-arm64: 2.0.1 + turbo-windows-64: 2.0.1 + turbo-windows-arm64: 2.0.1 dev: true /tween-functions@1.2.0: diff --git a/servers/fdr/Dockerfile b/servers/fdr/Dockerfile index 64a97c6912..ec5ec83c7f 100644 --- a/servers/fdr/Dockerfile +++ b/servers/fdr/Dockerfile @@ -7,8 +7,7 @@ RUN apk update # Produce a pruned version of the monorepo WORKDIR /app -# Install pnpm -RUN npm install -g turbo +RUN npm install -g turbo@2.0.1 COPY . . RUN turbo prune @fern-platform/fdr --docker @@ -33,9 +32,9 @@ COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json COPY shared shared COPY fern fern -# RUN pnpm turbo run compile --filter=@fern-platform/fdr -RUN pnpm --filter=@fern-api/fdr-sdk compile -RUN pnpm run compile --filter=@fern-platform/fdr +RUN pnpm turbo --filter=@fern-api/fdr-sdk compile +RUN pnpm turbo --filter=@fern-platform/fdr codegen +RUN pnpm turbo --filter=@fern-platform/fdr compile FROM base AS runner WORKDIR /app @@ -47,4 +46,4 @@ ENV DATABASE_URL=$DATABASE_URL COPY --from=installer /app . -ENTRYPOINT ["/bin/sh", "/app/servers/fdr/scripts/run.sh"] +ENTRYPOINT ["/bin/sh", "/app/servers/fdr/scripts/run.sh"] \ No newline at end of file diff --git a/servers/fdr/package.json b/servers/fdr/package.json index ccd4d45408..adcec5e56c 100644 --- a/servers/fdr/package.json +++ b/servers/fdr/package.json @@ -85,7 +85,7 @@ "docker:local": "dotenv -e .env.test -- ./create_docker.sh local", "docker:dev": "dotenv -e .env.dev -- ./create_docker.sh", "docker:prod": "dotenv -e .env.prod -- ./create_docker.sh", - "test": "vitest src/__test__/unit-tests --globals", + "test": "vitest src/__test__/unit-tests --globals --run", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "test:local": "dotenv -e .env.test -- vitest src/__test__/local --globals --config src/__test__/local/vitest.config.ts", diff --git a/servers/fdr/scripts/run.sh b/servers/fdr/scripts/run.sh index 58a34f47d7..9bbc9a1d86 100755 --- a/servers/fdr/scripts/run.sh +++ b/servers/fdr/scripts/run.sh @@ -1,4 +1,3 @@ #!/bin/sh -npm install -g prisma -prisma migrate deploy --schema /app/servers/fdr/prisma/schema.prisma -node --experimental-specifier-resolution=node /app/servers/fdr/dist/server.js \ No newline at end of file +prisma migrate deploy --schema /fdr/prisma/schema.prisma +node --experimental-specifier-resolution=node /fdr/dist/server.js \ No newline at end of file diff --git a/servers/fdr/turbo.json b/servers/fdr/turbo.json index cc807bcb92..a902298336 100644 --- a/servers/fdr/turbo.json +++ b/servers/fdr/turbo.json @@ -1,7 +1,7 @@ { "$schema": "https://turbo.build/schema.json", "extends": ["//"], - "pipeline": { + "tasks": { "compile": { "outputs": ["dist/**"], "dependsOn": ["^build", "^compile", "codegen"] diff --git a/shared/.prettierignore b/shared/.prettierignore index 70e45f1598..24f927d4f8 100644 --- a/shared/.prettierignore +++ b/shared/.prettierignore @@ -24,3 +24,4 @@ clis/docs-migrator/src/__test__/fixtures/bland/api-reference/endpoint/call.mdx **/__test__/**/*.json **/__test__/fixtures/ **/__test__/outputs/ +.turbo diff --git a/turbo.json b/turbo.json index bc07845ca3..03026b6e38 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,6 @@ { "$schema": "https://turbo.build/schema.json", - "pipeline": { + "tasks": { "build": { "outputs": ["dist/**", ".next/**", "!.next/cache/**"], "dependsOn": ["^build", "^compile", "codegen"] From 1c06eeda95abf33dd769213360ed6da7adc2e6ce Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Fri, 7 Jun 2024 20:34:31 -0400 Subject: [PATCH 2/4] fix: tests now run and finishes (--run) (#997) --- clis/docs-migrator/package.json | 2 +- .../src/__test__/outputs/bland/fern/README.md | 11 +- .../bland/fern/_snippets/snippet-example.mdx | 9 - .../api-reference/batch-endpoint/batch.mdx | 41 +- .../batch-endpoint/batch_get.mdx | 228 ++- .../batch-endpoint/batch_stop.mdx | 13 +- .../batch-endpoint/batches_get.mdx | 20 +- .../batch-endpoint/end_batches.mdx | 13 +- .../fern/api-reference/endpoint/call.mdx | 147 +- .../endpoint/dynamic_validate.mdx | 17 +- .../bland/fern/api-reference/endpoint/end.mdx | 14 +- .../fern/api-reference/endpoint/hold.mdx | 26 +- .../api-reference/endpoint/inbound_prompt.mdx | 26 +- .../fern/api-reference/endpoint/logs.mdx | 61 +- .../fern/api-reference/endpoint/purchase.mdx | 27 +- .../fern/api-reference/endpoint/recording.mdx | 13 +- .../fern/api-reference/hold-endpoint/hold.mdx | 26 +- .../outputs/bland/fern/api-v1/get/agents.mdx | 23 +- .../fern/api-v1/get/batches-id-analysis.mdx | 18 +- .../bland/fern/api-v1/get/batches-id.mdx | 244 ++- .../outputs/bland/fern/api-v1/get/batches.mdx | 20 +- .../api-v1/get/calls-corrected-transcript.mdx | 14 +- .../fern/api-v1/get/calls-id-recording.mdx | 11 +- .../bland/fern/api-v1/get/calls-id.mdx | 77 +- .../outputs/bland/fern/api-v1/get/calls.mdx | 17 +- .../bland/fern/api-v1/get/inbound-number.mdx | 16 +- .../outputs/bland/fern/api-v1/get/inbound.mdx | 3 +- .../outputs/bland/fern/api-v1/get/me.mdx | 16 +- .../bland/fern/api-v1/get/outbound.mdx | 26 +- .../bland/fern/api-v1/get/subaccounts-id.mdx | 10 +- .../bland/fern/api-v1/get/subaccounts.mdx | 5 +- .../bland/fern/api-v1/get/tools-tool-id.mdx | 8 +- .../outputs/bland/fern/api-v1/get/tools.mdx | 5 +- .../bland/fern/api-v1/get/voices-id.mdx | 13 +- .../outputs/bland/fern/api-v1/get/voices.mdx | 8 +- .../fern/api-v1/post/accounts-delete.mdx | 10 +- .../bland/fern/api-v1/post/accounts.mdx | 8 +- .../fern/api-v1/post/agents-id-authorize.mdx | 28 +- .../bland/fern/api-v1/post/agents-id.mdx | 147 +- .../outputs/bland/fern/api-v1/post/agents.mdx | 180 +- .../fern/api-v1/post/batches-id-analyze.mdx | 42 +- .../fern/api-v1/post/batches-id-stop.mdx | 12 +- .../bland/fern/api-v1/post/batches.mdx | 41 +- .../fern/api-v1/post/calls-id-analyze.mdx | 37 +- .../bland/fern/api-v1/post/calls-id-stop.mdx | 14 +- .../fern/api-v1/post/calls-simple-pathway.mdx | 17 +- .../bland/fern/api-v1/post/calls-simple.mdx | 19 +- .../outputs/bland/fern/api-v1/post/calls.mdx | 330 ++-- .../bland/fern/api-v1/post/inbound-insert.mdx | 4 +- .../api-v1/post/inbound-number-update.mdx | 200 ++- .../fern/api-v1/post/inbound-purchase.mdx | 30 +- .../fern/api-v1/post/outbound-purchase.mdx | 15 +- .../bland/fern/api-v1/post/sms-analyze.mdx | 26 +- .../api-v1/post/sms-check-registration.mdx | 5 +- .../fern/api-v1/post/sms-get-messages.mdx | 12 +- .../fern/api-v1/post/sms-prompt-update.mdx | 16 +- .../bland/fern/api-v1/post/sms-submit-reg.mdx | 12 +- .../fern/api-v1/post/sms-toggle-human.mdx | 16 +- .../fern/api-v1/post/sms-webhook-update.mdx | 13 +- .../api-v1/post/subaccounts-id-disable.mdx | 11 +- .../api-v1/post/subaccounts-id-rotate.mdx | 9 +- .../api-v1/post/subaccounts-id-transfer.mdx | 10 +- .../bland/fern/api-v1/post/subaccounts.mdx | 14 +- .../bland/fern/api-v1/post/tools-tool-id.mdx | 164 +- .../outputs/bland/fern/api-v1/post/tools.mdx | 161 +- .../fern/api-v1/post/voices-id-sample.mdx | 23 +- .../outputs/bland/fern/development.mdx | 21 +- .../enterprise-features/custom-twilio.mdx | 12 +- .../outputs/bland/fern/essentials/code.mdx | 9 - .../outputs/bland/fern/essentials/images.mdx | 16 +- .../bland/fern/essentials/markdown.mdx | 9 - .../bland/fern/essentials/navigation.mdx | 9 - .../bland/fern/essentials/settings.mdx | 28 +- .../outputs/bland/fern/examples/call.mdx | 24 +- .../outputs/bland/fern/quickstart.mdx | 62 +- .../outputs/bland/fern/starter-guide.mdx | 25 +- .../bland/fern/tutorials/custom-tools.mdx | 199 +- .../bland/fern/tutorials/dynamic-data.mdx | 144 +- .../bland/fern/tutorials/live-transfer.mdx | 9 - .../bland/fern/tutorials/max-duration.mdx | 9 - .../outputs/bland/fern/tutorials/pathways.mdx | 69 +- .../tutorials/send-1000-calls-at-once.mdx | 12 +- .../bland/fern/tutorials/send-first-call.mdx | 9 - .../bland/fern/tutorials/webhook-signing.mdx | 29 +- .../outputs/bland/fern/tutorials/webhooks.mdx | 8 - .../outputs/bland/fern/welcome-to-bland.mdx | 3 + .../src/__test__/outputs/zep/fern/README.md | 2 +- .../zep/fern/chat-history-memory/memories.mdx | 62 +- .../zep/fern/chat-history-memory/messages.mdx | 62 +- .../zep/fern/chat-history-memory/overview.mdx | 13 +- .../zep/fern/chat-history-memory/search.mdx | 41 +- .../zep/fern/chat-history-memory/sessions.mdx | 39 +- .../fern/chat-history-memory/summaries.mdx | 7 +- .../zep/fern/dialog-classification.mdx | 174 +- .../outputs/zep/fern/document-collections.mdx | 96 +- .../outputs/zep/fern/ecosystem/chainlit.mdx | 35 +- .../outputs/zep/fern/ecosystem/flowise.mdx | 39 +- .../src/__test__/outputs/zep/fern/faq.mdx | 3 + .../outputs/zep/fern/getting-support.mdx | 2 +- .../examples/messagehistory-example.mdx | 72 +- .../examples/rag-message-history-example.mdx | 7 +- .../examples/vectorstore-example.mdx | 105 +- .../zep/fern/langchain/messagehistory.mdx | 6 +- .../outputs/zep/fern/langchain/overview.mdx | 3 + .../zep/fern/langchain/vectorstore.mdx | 6 +- .../outputs/zep/fern/legal/privacy-policy.mdx | 19 +- .../zep/fern/legal/terms-of-service.mdx | 7 +- .../zep/fern/legal/website-terms-of-use.mdx | 791 ++++---- .../outputs/zep/fern/openapi/openapi.json | 1593 ++++++++++++++++- .../__test__/outputs/zep/fern/projects.mdx | 24 +- .../outputs/zep/fern/question-synthesis.mdx | 19 +- .../src/__test__/outputs/zep/fern/sdks.mdx | 30 +- .../src/__test__/outputs/zep/fern/users.mdx | 63 +- .../outputs/zep/fern/working-with-search.mdx | 45 +- .../generator-cli/.depcheckrc.json | 0 .../generator-cli/.env-cmdrc.cjs | 0 {packages => clis}/generator-cli/.mrlint.json | 0 .../generator-cli/.prettierrc.cjs | 0 {packages => clis}/generator-cli/package.json | 4 +- .../__snapshots__/basic-go.test.ts.snap | 0 .../cohere-go-merged.test.ts.snap | 0 .../__snapshots__/cohere-go.test.ts.snap | 0 .../__snapshots__/empty-go.test.ts.snap | 0 .../src/__test__/basic-go.test.ts | 0 .../src/__test__/cohere-go-merged.test.ts | 0 .../src/__test__/cohere-go.test.ts | 0 .../src/__test__/empty-go.test.ts | 0 .../__test__/fixtures/basic-go/readme.json | 0 .../fixtures/cohere-go-merged/README.md | 0 .../fixtures/cohere-go-merged/readme.json | 0 .../__test__/fixtures/cohere-go/readme.json | 0 .../__test__/fixtures/empty-go/readme.json | 0 .../src/__test__/testGenerateReadme.ts | 0 {packages => clis}/generator-cli/src/cli.ts | 0 .../src/configuration/generated/api/index.ts | 0 .../generated/api/resources/feature/index.ts | 0 .../resources/feature/types/FeatureConfig.ts | 0 .../api/resources/feature/types/FeatureId.ts | 0 .../resources/feature/types/FeatureSpec.ts | 0 .../feature/types/StructuredFeatureId.ts | 0 .../api/resources/feature/types/index.ts | 0 .../generated/api/resources/index.ts | 0 .../generated/api/resources/readme/index.ts | 0 .../api/resources/readme/types/CsharpInfo.ts | 0 .../api/resources/readme/types/GoInfo.ts | 0 .../resources/readme/types/GoPublishInfo.ts | 0 .../api/resources/readme/types/JavaInfo.ts | 0 .../resources/readme/types/LanguageInfo.ts | 0 .../readme/types/MavenPublishInfo.ts | 0 .../resources/readme/types/NpmPublishInfo.ts | 0 .../readme/types/NugetPublishInfo.ts | 0 .../resources/readme/types/PypiPublishInfo.ts | 0 .../api/resources/readme/types/PythonInfo.ts | 0 .../resources/readme/types/ReadmeConfig.ts | 0 .../resources/readme/types/ReadmeFeature.ts | 0 .../readme/types/RubyGemsPublishInfo.ts | 0 .../api/resources/readme/types/RubyInfo.ts | 0 .../resources/readme/types/TypescriptInfo.ts | 0 .../api/resources/readme/types/index.ts | 0 .../src/configuration/generated/core/index.ts | 0 .../generated/core/schemas/Schema.ts | 0 .../core/schemas/builders/date/date.ts | 0 .../core/schemas/builders/date/index.ts | 0 .../core/schemas/builders/enum/enum.ts | 0 .../core/schemas/builders/enum/index.ts | 0 .../generated/core/schemas/builders/index.ts | 0 .../core/schemas/builders/lazy/index.ts | 0 .../core/schemas/builders/lazy/lazy.ts | 0 .../core/schemas/builders/lazy/lazyObject.ts | 0 .../core/schemas/builders/list/index.ts | 0 .../core/schemas/builders/list/list.ts | 0 .../builders/literals/booleanLiteral.ts | 0 .../core/schemas/builders/literals/index.ts | 0 .../builders/literals/stringLiteral.ts | 0 .../object-like/getObjectLikeUtils.ts | 0 .../schemas/builders/object-like/index.ts | 0 .../schemas/builders/object-like/types.ts | 0 .../core/schemas/builders/object/index.ts | 0 .../core/schemas/builders/object/object.ts | 0 .../object/objectWithoutOptionalProperties.ts | 0 .../core/schemas/builders/object/property.ts | 0 .../core/schemas/builders/object/types.ts | 0 .../core/schemas/builders/primitives/any.ts | 0 .../schemas/builders/primitives/boolean.ts | 0 .../core/schemas/builders/primitives/index.ts | 0 .../schemas/builders/primitives/number.ts | 0 .../schemas/builders/primitives/string.ts | 0 .../schemas/builders/primitives/unknown.ts | 0 .../core/schemas/builders/record/index.ts | 0 .../core/schemas/builders/record/record.ts | 0 .../core/schemas/builders/record/types.ts | 0 .../builders/schema-utils/JsonError.ts | 0 .../builders/schema-utils/ParseError.ts | 0 .../builders/schema-utils/getSchemaUtils.ts | 0 .../schemas/builders/schema-utils/index.ts | 0 .../schema-utils/stringifyValidationErrors.ts | 0 .../core/schemas/builders/set/index.ts | 0 .../core/schemas/builders/set/set.ts | 0 .../builders/undiscriminated-union/index.ts | 0 .../builders/undiscriminated-union/types.ts | 0 .../undiscriminatedUnion.ts | 0 .../schemas/builders/union/discriminant.ts | 0 .../core/schemas/builders/union/index.ts | 0 .../core/schemas/builders/union/types.ts | 0 .../core/schemas/builders/union/union.ts | 0 .../generated/core/schemas/index.ts | 0 .../core/schemas/utils/MaybePromise.ts | 0 .../addQuestionMarksToNullableProperties.ts | 0 .../utils/createIdentitySchemaCreator.ts | 0 .../generated/core/schemas/utils/entries.ts | 0 .../core/schemas/utils/filterObject.ts | 0 .../utils/getErrorMessageForIncorrectType.ts | 0 .../core/schemas/utils/isPlainObject.ts | 0 .../generated/core/schemas/utils/keys.ts | 0 .../core/schemas/utils/maybeSkipValidation.ts | 0 .../generated/core/schemas/utils/partition.ts | 0 .../generated/errors/FernGeneratorCliError.ts | 0 .../errors/FernGeneratorCliTimeoutError.ts | 0 .../configuration/generated/errors/index.ts | 0 .../src/configuration/generated/index.ts | 0 .../generated/serialization/index.ts | 0 .../serialization/resources/feature/index.ts | 0 .../resources/feature/types/FeatureConfig.ts | 0 .../resources/feature/types/FeatureId.ts | 0 .../resources/feature/types/FeatureSpec.ts | 0 .../feature/types/StructuredFeatureId.ts | 0 .../resources/feature/types/index.ts | 0 .../serialization/resources/index.ts | 0 .../serialization/resources/readme/index.ts | 0 .../resources/readme/types/CsharpInfo.ts | 0 .../resources/readme/types/GoInfo.ts | 0 .../resources/readme/types/GoPublishInfo.ts | 0 .../resources/readme/types/JavaInfo.ts | 0 .../resources/readme/types/LanguageInfo.ts | 0 .../readme/types/MavenPublishInfo.ts | 0 .../resources/readme/types/NpmPublishInfo.ts | 0 .../readme/types/NugetPublishInfo.ts | 0 .../resources/readme/types/PypiPublishInfo.ts | 0 .../resources/readme/types/PythonInfo.ts | 0 .../resources/readme/types/ReadmeConfig.ts | 0 .../resources/readme/types/ReadmeFeature.ts | 0 .../readme/types/RubyGemsPublishInfo.ts | 0 .../resources/readme/types/RubyInfo.ts | 0 .../resources/readme/types/TypescriptInfo.ts | 0 .../resources/readme/types/index.ts | 0 .../generator-cli/src/configuration/index.ts | 0 .../src/configuration/loadReadmeConfig.ts | 0 {packages => clis}/generator-cli/src/index.ts | 0 .../generator-cli/src/readme/Block.ts | 0 .../generator-cli/src/readme/BlockMerger.ts | 0 .../src/readme/ReadmeGenerator.ts | 0 .../generator-cli/src/readme/ReadmeParser.ts | 0 .../generator-cli/src/readme/index.ts | 0 .../generator-cli/src/utils/Writer.ts | 0 .../generator-cli/tsconfig.json | 0 packages/commons/core-utils/package.json | 2 +- packages/commons/fdr-utils/package.json | 2 +- packages/commons/loadable/package.json | 2 +- .../react/common-components/package.json | 2 +- packages/commons/react/fonts/package.json | 2 +- .../commons/react/react-commons/package.json | 2 +- .../react/react-query-utils/package.json | 2 +- packages/fdr-sdk/package.json | 2 +- packages/healthchecks/package.json | 2 +- packages/scripts/package.json | 2 +- packages/template-resolver/package.json | 2 +- packages/ui/app/package.json | 2 +- .../app/src/util/__test__/dateUtils.test.ts | 162 -- packages/ui/components/package.json | 2 +- packages/ui/docs-bundle/package.json | 2 +- packages/ui/fontawesome-cdn/package.json | 2 +- packages/ui/local-preview-bundle/package.json | 2 +- pnpm-lock.yaml | 108 +- servers/fdr/package.json | 2 +- 274 files changed, 4101 insertions(+), 3132 deletions(-) rename {packages => clis}/generator-cli/.depcheckrc.json (100%) rename {packages => clis}/generator-cli/.env-cmdrc.cjs (100%) rename {packages => clis}/generator-cli/.mrlint.json (100%) rename {packages => clis}/generator-cli/.prettierrc.cjs (100%) rename {packages => clis}/generator-cli/package.json (86%) rename {packages => clis}/generator-cli/src/__test__/__snapshots__/basic-go.test.ts.snap (100%) rename {packages => clis}/generator-cli/src/__test__/__snapshots__/cohere-go-merged.test.ts.snap (100%) rename {packages => clis}/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap (100%) rename {packages => clis}/generator-cli/src/__test__/__snapshots__/empty-go.test.ts.snap (100%) rename {packages => clis}/generator-cli/src/__test__/basic-go.test.ts (100%) rename {packages => clis}/generator-cli/src/__test__/cohere-go-merged.test.ts (100%) rename {packages => clis}/generator-cli/src/__test__/cohere-go.test.ts (100%) rename {packages => clis}/generator-cli/src/__test__/empty-go.test.ts (100%) rename {packages => clis}/generator-cli/src/__test__/fixtures/basic-go/readme.json (100%) rename {packages => clis}/generator-cli/src/__test__/fixtures/cohere-go-merged/README.md (100%) rename {packages => clis}/generator-cli/src/__test__/fixtures/cohere-go-merged/readme.json (100%) rename {packages => clis}/generator-cli/src/__test__/fixtures/cohere-go/readme.json (100%) rename {packages => clis}/generator-cli/src/__test__/fixtures/empty-go/readme.json (100%) rename {packages => clis}/generator-cli/src/__test__/testGenerateReadme.ts (100%) rename {packages => clis}/generator-cli/src/cli.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureConfig.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureId.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureSpec.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/types/StructuredFeatureId.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/feature/types/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/CsharpInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/GoInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/GoPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/JavaInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/LanguageInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/MavenPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/NpmPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/NugetPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/PypiPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/PythonInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeFeature.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/RubyGemsPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/RubyInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/TypescriptInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/api/resources/readme/types/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/Schema.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/date/date.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/date/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/enum/enum.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/enum/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/lazy/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazy.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazyObject.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/list/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/list/list.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/literals/booleanLiteral.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/literals/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/literals/stringLiteral.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object-like/getObjectLikeUtils.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object-like/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object-like/types.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object/object.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object/objectWithoutOptionalProperties.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object/property.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/object/types.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/any.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/boolean.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/number.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/string.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/primitives/unknown.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/record/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/record/record.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/record/types.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/JsonError.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/ParseError.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/getSchemaUtils.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/stringifyValidationErrors.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/set/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/set/set.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/types.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/union/discriminant.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/union/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/union/types.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/builders/union/union.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/MaybePromise.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/addQuestionMarksToNullableProperties.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/createIdentitySchemaCreator.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/entries.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/filterObject.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/getErrorMessageForIncorrectType.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/isPlainObject.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/keys.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/maybeSkipValidation.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/core/schemas/utils/partition.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/errors/FernGeneratorCliError.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/errors/FernGeneratorCliTimeoutError.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/errors/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureConfig.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureId.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureSpec.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/types/StructuredFeatureId.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/feature/types/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/CsharpInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/JavaInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/LanguageInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/MavenPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/NpmPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/NugetPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/PypiPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/PythonInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeFeature.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyGemsPublishInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/TypescriptInfo.ts (100%) rename {packages => clis}/generator-cli/src/configuration/generated/serialization/resources/readme/types/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/index.ts (100%) rename {packages => clis}/generator-cli/src/configuration/loadReadmeConfig.ts (100%) rename {packages => clis}/generator-cli/src/index.ts (100%) rename {packages => clis}/generator-cli/src/readme/Block.ts (100%) rename {packages => clis}/generator-cli/src/readme/BlockMerger.ts (100%) rename {packages => clis}/generator-cli/src/readme/ReadmeGenerator.ts (100%) rename {packages => clis}/generator-cli/src/readme/ReadmeParser.ts (100%) rename {packages => clis}/generator-cli/src/readme/index.ts (100%) rename {packages => clis}/generator-cli/src/utils/Writer.ts (100%) rename {packages => clis}/generator-cli/tsconfig.json (100%) delete mode 100644 packages/ui/app/src/util/__test__/dateUtils.test.ts diff --git a/clis/docs-migrator/package.json b/clis/docs-migrator/package.json index 380ea0a1d6..bb16358155 100644 --- a/clis/docs-migrator/package.json +++ b/clis/docs-migrator/package.json @@ -13,7 +13,7 @@ "scripts": { "clean": "rm -rf ./dist && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", "format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/README.md b/clis/docs-migrator/src/__test__/outputs/bland/fern/README.md index 994a55db0b..6076636c92 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/README.md +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/README.md @@ -24,18 +24,9 @@ mintlify dev ### 😎 Publishing Changes -Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. +Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. #### Troubleshooting - Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies. - Page loads as a 404 - Make sure you are running in a folder with `mint.json` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/_snippets/snippet-example.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/_snippets/snippet-example.mdx index 476082d3dc..7ab902fc16 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/_snippets/snippet-example.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/_snippets/snippet-example.mdx @@ -5,12 +5,3 @@ slug: _snippets/snippet-example ## My Snippet This is an example of a reusable snippet - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch.mdx index a3c92dd406..d3c8e4e54e 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch.mdx @@ -16,10 +16,12 @@ slug: api-reference/batch-endpoint/batch This is the prompt or task used for all the phone calls in the request. Information can be inserted into it surrounding variable names with \{\{curly braces\}\}. - Example: - ```json - "You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}." - ``` +Example: + +```json +"You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}." +``` + @@ -27,10 +29,11 @@ slug: api-reference/batch-endpoint/batch Each call in call_data *must* have a `phone_number` property. Properties are case-sensitive. - Example: +Example: + ```json [ - { + { "phone_number": "1234567890", "business": "ABC co.", "service": "Netflix", @@ -44,24 +47,29 @@ slug: api-reference/batch-endpoint/batch } ] ``` + - Adds a user-friendly label to your batch to keep track of it's original intention. This can help differentiate multiple call batches that are part of the same Campaign. Shown when a batch is retreived. + Adds a user-friendly label to your batch to keep track of it's original intention. This can help differentiate + multiple call batches that are part of the same Campaign. Shown when a batch is retreived. - Use ```campaign_id``` to organize related batches together. This can be set manually or auto-generated through Campaigns. + Use ```campaign_id``` to organize related batches together. This can be set manually or auto-generated through + Campaigns. When this is set to ```true```, only the first call of ```call_data``` will be dispatched. A common use case is to set the first ```phone_number``` value to your own to confirm everything's set up properly. - Includes additional information in the response when true so that it's easier to find any issues. +Includes additional information in the response when true so that it's easier to find any issues. + - All other parameters supported by the [Send Call](../../api-v1/post/calls.mdx) endpoint are supported here as well. They will be applied to each call in the batch. + All other parameters supported by the [Send Call](../../api-v1/post/calls.mdx) endpoint are supported here as well. They will + be applied to each call in the batch. ### Response @@ -78,18 +86,9 @@ slug: api-reference/batch-endpoint/batch ```json Response { - "message": "success", - "batch_id": "3p$7rQ3p9sT5bzmF-gen-batch" + "message": "success", + "batch_id": "3p$7rQ3p9sT5bzmF-gen-batch" } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_get.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_get.mdx index 32181d421a..66bca0489b 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_get.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_get.mdx @@ -36,8 +36,7 @@ slug: api-reference/batch-endpoint/batch_get - The unique identifier of the batch - used as the `batch_id` parameter in other - API calls. + The unique identifier of the batch - used as the `batch_id` parameter in other API calls. @@ -60,7 +59,6 @@ slug: api-reference/batch-endpoint/batch_get An object containing parameters for the calls in the batch. - An object containing analysis data for the batch. @@ -80,24 +78,26 @@ slug: api-reference/batch-endpoint/batch_get An object containing the number of calls in each queue status. - Example: - ```json - { - "complete": 237, - "queued": 2, - "call_error": 1 - } - ``` +Example: + +```json +{ + "complete": 237, + "queued": 2, + "call_error": 1 +} +``` + Contains `average`, `average_nonzero`, `summary` and `all` fields. - - `average`: The average call length in seconds. - - `average_nonzero`: The average call length in seconds, excluding calls with a length of less than a second. - - `summary`: A summary of the call lengths, grouped into ranges. - - `all`: Contains each call length, in case you want to use a different grouping than the default. - +- `average`: The average call length in seconds. +- `average_nonzero`: The average call length in seconds, excluding calls with a length of less than a second. +- `summary`: A summary of the call lengths, grouped into ranges. +- `all`: Contains each call length, in case you want to use a different grouping than the default. + Contains each `call_id` in the batch. @@ -106,15 +106,17 @@ slug: api-reference/batch-endpoint/batch_get Contains any error messages that calls in the batch may have. - Example: - ```json - [ - { - "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", - "error_message": "Cannot transfer to +12223334444 - Call is no longer active" - } - ] - ``` +Example: + +```json +[ + { + "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", + "error_message": "Cannot transfer to +12223334444 - Call is no longer active" + } +] +``` + @@ -169,107 +171,97 @@ slug: api-reference/batch-endpoint/batch_get } }, "analysis": { - "total_calls": 88, - "completed_calls": 86, - "in_progress_calls": 2, - "queue_statuses": { - "complete": 85, - "started": 2, - "call_error": 1 + "total_calls": 88, + "completed_calls": 86, + "in_progress_calls": 2, + "queue_statuses": { + "complete": 85, + "started": 2, + "call_error": 1 + }, + "call_lengths": { + "average": 17, + "average_nonzero": 31, + "summary": { + "0-5": 18, + "5-10": 4, + "10-15": 3, + "15-20": 2, + "20-30": 14, + "30-45": 28, + "45-60": 11, + "60-90": 6, + "90-120": 1, + "120+": 1 }, - "call_lengths": { - "average": 17, - "average_nonzero": 31, - "summary": { - "0-5": 18, - "5-10": 4, - "10-15": 3, - "15-20": 2, - "20-30": 14, - "30-45": 28, - "45-60": 11, - "60-90": 6, - "90-120": 1, - "120+": 1 - }, - "all": [ - 7, - 32, - //... - ] + "all": [ + 7, 32 + //... + ] + }, + "call_ids": [ + "ffa99be3-63dd-44dc-9523-380cd25c1b9e", + "591338a8-34b2-41e6-93da-b9029c9bdedc" + //... + ], + "error_messages": [ + { + "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", + "error_message": "Cannot transfer to +12223334444 - Call is no longer active" + } + ], + "endpoints": { + "api.bland.ai": 88 + } + }, + "call_data": [ + { + "status": "completed", + "corrected_duration": "12", + "end_at": "2023-12-16T00:17:38.000Z", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e", + "to": "1112223333", + "from": "+17473423273", + "completed": true, + "created_at": "2023-12-16T00:17:22.383682+00:00", + "queue_status": "complete", + "endpoint_url": "api.bland.ai", + "max_duration": 30, + "error_message": null, + "request_data": { + "phone_number": "1112223333", + "reduce_latency": true, + "wait": false, + "language": "ENG" }, - "call_ids": [ - "ffa99be3-63dd-44dc-9523-380cd25c1b9e", - "591338a8-34b2-41e6-93da-b9029c9bdedc", - //... - ], - "error_messages": [ + "transcripts": [ + { + "id": 1188954, + "created_at": "2023-12-16T00:17:30.46833+00:00", + "text": " Hi, Im calling about the laundromat for sale. —  ", + "user": "assistant", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" + }, { - "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", - "error_message": "Cannot transfer to +12223334444 - Call is no longer active" + "id": 1188957, + "created_at": "2023-12-16T00:17:35.14056+00:00", + "text": "I'll get back to you as soon as you can. Just leave a message. Thank you. Bye.", + "user": "user", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" + }, + { + "id": 1188959, + "created_at": "2023-12-16T00:17:36.710551+00:00", + "text": "Ended call: Goodbye", + "user": "agent-action", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" } ], - "endpoints": { - "api.bland.ai": 88 - } - }, - "call_data": [ - { - "status": "completed", - "corrected_duration": "12", - "end_at": "2023-12-16T00:17:38.000Z", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e", - "to": "1112223333", - "from": "+17473423273", - "completed": true, - "created_at": "2023-12-16T00:17:22.383682+00:00", - "queue_status": "complete", - "endpoint_url": "api.bland.ai", - "max_duration": 30, - "error_message": null, - "request_data": { - "phone_number": "1112223333", - "reduce_latency": true, - "wait": false, - "language": "ENG" - }, - "transcripts": [ - { - "id": 1188954, - "created_at": "2023-12-16T00:17:30.46833+00:00", - "text": " Hi, Im calling about the laundromat for sale. —  ", - "user": "assistant", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - }, - { - "id": 1188957, - "created_at": "2023-12-16T00:17:35.14056+00:00", - "text": "I'll get back to you as soon as you can. Just leave a message. Thank you. Bye.", - "user": "user", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - }, - { - "id": 1188959, - "created_at": "2023-12-16T00:17:36.710551+00:00", - "text": "Ended call: Goodbye", - "user": "agent-action", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - } - ], - "call_length": 6.242 - }, + "call_length": 6.242 + } //... ] } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_stop.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_stop.mdx index 97ef945e46..142e7cc5c6 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_stop.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batch_stop.mdx @@ -20,8 +20,8 @@ slug: api-reference/batch-endpoint/batch_stop ### Response - The status of the request. If anything other than 'success', an error has - occurred or all calls have already been completed. + The status of the request. If anything other than 'success', an error has occurred or all calls have already been + completed. @@ -48,12 +48,3 @@ slug: api-reference/batch-endpoint/batch_stop ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batches_get.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batches_get.mdx index fadc6f25d8..e537d84f36 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batches_get.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/batches_get.mdx @@ -26,8 +26,8 @@ slug: api-reference/batch-endpoint/batches_get - The original base prompt used to create the batch. Will still contain the - original placeholder variables such as `{{ business }}` or `{{ name }}`. + The original base prompt used to create the batch. Will still contain the original placeholder variables such as ` + {{ business }}` or `{{ name }}`. @@ -35,13 +35,12 @@ slug: api-reference/batch-endpoint/batches_get - Enterprise customers with custom endpoints will see the endpoint code here if - specified. + Enterprise customers with custom endpoints will see the endpoint code here if specified. - The base call parameters used to create the batch, such as `voice_id`, - `max_duration`, `reduce_latency`, and `wait_for_greeting`. + The base call parameters used to create the batch, such as `voice_id`, `max_duration`, `reduce_latency`, and + `wait_for_greeting`. @@ -77,12 +76,3 @@ slug: api-reference/batch-endpoint/batches_get } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/end_batches.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/end_batches.mdx index 806774404a..17b24fea57 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/end_batches.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/batch-endpoint/end_batches.mdx @@ -14,8 +14,8 @@ slug: api-reference/batch-endpoint/end_batches ### Response - The status of the request. If anything other than 'success', an error has - occurred or all calls have already been completed. + The status of the request. If anything other than 'success', an error has occurred or all calls have already been + completed. @@ -46,12 +46,3 @@ slug: api-reference/batch-endpoint/end_batches ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/call.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/call.mdx index 7e7acbe6da..3a4cf5b5b8 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/call.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/call.mdx @@ -15,51 +15,56 @@ slug: api-reference/endpoint/call The phone number to call. Country code required for non-US numbers. - Example: `+12223334444`, `+44770090000`, `+61491550156`. +Example: `+12223334444`, `+44770090000`, `+61491550156`. + A phone number that the agent can transfer to under specific conditions, such as when the caller/callee asks to speak to a human. - For best results, specify the exact conditions to transfer under in the `task` parameter. Refer to the action as "transfer", any other phrasing such as "swap" or "switch" can cause unexpected behavior. +For best results, specify the exact conditions to transfer under in the `task` parameter. Refer to the action as "transfer", any other phrasing such as "swap" or "switch" can cause unexpected behavior. + +Example: `+12223334444`, `+44770090000`, `+61491550156`. - Example: `+12223334444`, `+44770090000`, `+61491550156`. Specify a purchased Outbound Number to call from. Country code is required, spaces or parentheses must be excluded. - By default, calls are initiated from a separate pool of numbers owned by Bland. +By default, calls are initiated from a separate pool of numbers owned by Bland. + Define how the AI should behave. Provide instructions, relevant information, and examples of the ideal conversation flow. - Note: Concise prompts lead to higher performance and adherence to instructions. Overly verbose prompts 'dilute' the context if filled with unnecessary/irrelevant details. +Note: Concise prompts lead to higher performance and adherence to instructions. Overly verbose prompts 'dilute' the context if filled with unnecessary/irrelevant details. + - Reducing latency means that the agent will generate responses more quickly and have less of a delay. This must be set to ```true``` when using Voice Clones. + Reducing latency means that the agent will generate responses more quickly and have less of a delay. This must be set + to ```true``` when using Voice Clones. When reduce latency is set to `true` (default): - - 0: American male - - 1: Australian female - - 2: American female +- 0: American male +- 1: Australian female +- 2: American female - When reduce latency is set to `false`: - - 0: American female (southern accent) - - 1: American male - - 2: British female - - 3: Indian male - +When reduce latency is set to `false`: + +- 0: American female (southern accent) +- 1: American male +- 2: British female +- 3: Indian male + - The webhook should be a http / https callback url. We will send the call_id - and transcript to this URL after the call completes. This can be useful if you - want to have real time notifications when calls finish. + The webhook should be a http / https callback url. We will send the call_id and transcript to this URL after the call + completes. This can be useful if you want to have real time notifications when calls finish. @@ -73,11 +78,13 @@ slug: api-reference/endpoint/call - A phrase that your call will start with instead of a generating one on the fly. This works both with and without `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. + A phrase that your call will start with instead of a generating one on the fly. This works both with and without + `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. - To record your phone call, set `record` to true. When your call completes, you can access the recording by requesting the `/call/recording` endpoint. + To record your phone call, set `record` to true. When your call completes, you can access the recording by requesting + the `/call/recording` endpoint. @@ -85,18 +92,20 @@ slug: api-reference/endpoint/call Note: This is an experimental parameter and may behave unexpectedly. - Adjust the predictability and consistency of the AI agent's voice. Lower values allow larger deviations from the baseline voice, whether default or cloned. Setting this too high however can cause a monotone voice. +Adjust the predictability and consistency of the AI agent's voice. Lower values allow larger deviations from the baseline voice, whether default or cloned. Setting this too high however can cause a monotone voice. + +Accepts decimal values between `0` and `1` (inclusive). - Accepts decimal values between `0` and `1` (inclusive). Note: This is an experimental parameter and may behave unexpectedly. - Higher values will make speech differences between the selected voice and others more prominent. Extremely high values can cause voice distortion. +Higher values will make speech differences between the selected voice and others more prominent. Extremely high values can cause voice distortion. + +Use lower values to lower the distinctiveness of the voice or eliminate unwanted audio static spikes. - Use lower values to lower the distinctiveness of the voice or eliminate unwanted audio static spikes. +Accepts decimal values between `0` and `1` (inclusive). - Accepts decimal values between `0` and `1` (inclusive). @@ -104,23 +113,19 @@ slug: api-reference/endpoint/call Note #2: Setting `reduce_latency` to `false` will cause this parameter to be ignored. - How fast your agent talks! This parameter is simply a speech-speed multiplier, and works with fractional values such as `0.5` or large ones like `2`. +How fast your agent talks! This parameter is simply a speech-speed multiplier, and works with fractional values such as `0.5` or large ones like `2`. + +Accepts decimal values between `0.1` and `5` (inclusive). - Accepts decimal values between `0.1` and `5` (inclusive). - Select a supported language of your choice. - Optimizes every part of our API for that language - transcription, speech, and other inner workings. - - Supported Languages and their codes: - - English: ```eng``` - - Spanish: ```esp``` - - French: ```fre``` - - Polish: ```pol``` + Select a supported language of your choice. Optimizes every part of our API for that language - transcription, speech, + and other inner workings. Supported Languages and their codes: - English: ```eng``` - Spanish: ```esp``` - French: + ```fre``` - Polish: ```pol``` @@ -157,49 +162,51 @@ slug: api-reference/endpoint/call - AMD mode helps our AI navigate phone trees and IVR systems. If you know your call will hit an automated system you should switch it on. - - NOTE: AMD mode causes increased delay for the first response, even if answered by a human. Highly recommended to set to `false` in the majority of cases. + AMD mode helps our AI navigate phone trees and IVR systems. If you know your call will hit an automated system you + should switch it on. NOTE: AMD mode causes increased delay for the first response, even if answered by a human. Highly + recommended to set to `false` in the majority of cases. When you want your AI to "know" a specific fact - like the caller's name or other relevant context. - The AI agent will be aware of both the key names as well as their corresponding values. +The AI agent will be aware of both the key names as well as their corresponding values. + A set of external API requests to fetch at the start of the call or repeatedly. - Each request object should contain: +Each request object should contain: - `url`: The URL of the external API to fetch data from. +`url`: The URL of the external API to fetch data from. - `response_data`: An array of objects describing how to parse and use the data fetched from the API. Explained in more detail below. +`response_data`: An array of objects describing how to parse and use the data fetched from the API. Explained in more detail below. - The following are optional: +The following are optional: - `method`: Allows `GET` or `POST`. Default: `GET` +`method`: Allows `GET` or `POST`. Default: `GET` - `cache`: Whether to fetch the data once at the beginning of the call, or to re-check continuously for data that might change mid-call. Default: `true` +`cache`: Whether to fetch the data once at the beginning of the call, or to re-check continuously for data that might change mid-call. Default: `true` - `headers`: An object of headers to send with the request. +`headers`: An object of headers to send with the request. - `body`: The body of the request. - - The following variables can be injected into the dynamic request body: - - - `{{from}}` (Ex. `+12223334444`) - - `{{to}}` - - `{{short_from}}` (Ex. `2223334444`) - - `{{short_to}}` - - `{{call_id}}` - - These string values will be replaced in each `dynamic_data[].body` where they're used by system values in each request. +`body`: The body of the request. + +The following variables can be injected into the dynamic request body: + +- `{{from}}` (Ex. `+12223334444`) +- `{{to}}` +- `{{short_from}}` (Ex. `2223334444`) +- `{{short_to}}` +- `{{call_id}}` + +These string values will be replaced in each `dynamic_data[].body` where they're used by system values in each request. + +Try out with this example: - Try out with this example: ```json "dynamic_data": [ { @@ -219,24 +226,27 @@ slug: api-reference/endpoint/call } ] ``` + An array of objects describing how to parse and use the data fetched from the API. Each object in this array should contain: -- `name`: A label for the fetched data. + +- `name`: A label for the fetched data. - Example: `"Flight Status"` -- `data`: The JSON path in the API response to extract the data from. +- `data`: The JSON path in the API response to extract the data from. - Example: `"user.flights[0].status"` -- `context`: How this data should be incorporated into the AI's knowledge. +- `context`: How this data should be incorporated into the AI's knowledge. - Example: `"John's flight is currently {{Flight Status}}"` - - + + When you increase the interruption latency, you force the AI phone agent to listen longer before responding. In practice, increasing the threshold results in less interruptions and more latency. - Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted much less frequently. +Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted much less frequently. + ### Response @@ -259,12 +269,3 @@ Each object in this array should contain: ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/dynamic_validate.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/dynamic_validate.mdx index eae350cedb..4e64e57e69 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/dynamic_validate.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/dynamic_validate.mdx @@ -17,7 +17,8 @@ slug: api-reference/endpoint/dynamic_validate ### Body - An array of objects, each specifying an external API to fetch data from. These objects must include the API endpoint, the HTTP method, a cache flag, and details on parsing and integrating the response. + An array of objects, each specifying an external API to fetch data from. These objects must include the API endpoint, + the HTTP method, a cache flag, and details on parsing and integrating the response. ### Response @@ -31,7 +32,8 @@ slug: api-reference/endpoint/dynamic_validate - Contains the results from the dynamic data fetch. Each object in this array shows the cache status, the name of the data, and the processed prompt with the inserted data. + Contains the results from the dynamic data fetch. Each object in this array shows the cache status, the name of the + data, and the processed prompt with the inserted data. @@ -39,7 +41,8 @@ slug: api-reference/endpoint/dynamic_validate - The parsed data from fetching the dynamic data. This can be used in other requests, the `task` or `prompt` fields, even other dynamic data requests through the `{{variable}}` syntax. + The parsed data from fetching the dynamic data. This can be used in other requests, the `task` or `prompt` fields, + even other dynamic data requests through the `{{ variable }}` syntax. @@ -150,11 +153,3 @@ slug: api-reference/endpoint/dynamic_validate } ``` - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/end.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/end.mdx index d35aa2b699..74d8f9da97 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/end.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/end.mdx @@ -23,9 +23,8 @@ slug: api-reference/endpoint/end - If the status is `success`, the message will say "Call ended successfully." - Otherwise if the status is `error`, the message will say "SID not found for - the given c_id." or "Internal server error." + If the status is `success`, the message will say "Call ended successfully." Otherwise if the status is `error`, the + message will say "SID not found for the given c_id." or "Internal server error." @@ -38,12 +37,3 @@ slug: api-reference/endpoint/end ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/hold.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/hold.mdx index 08e91196bd..66191da697 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/hold.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/hold.mdx @@ -16,22 +16,19 @@ slug: api-reference/endpoint/hold ### Body - This is the phone number of the person or company you want to call. - - International numbers: must include the country code and may not include - additional formatting (like parentheses and dashes). E.g. '+447700900077'. - - U.S. numbers: may include formatting, but we recommend stripping all - additional characters. + This is the phone number of the person or company you want to call. - International numbers: must include the country + code and may not include additional formatting (like parentheses and dashes). E.g. '+447700900077'. - U.S. numbers: + may include formatting, but we recommend stripping all additional characters. - Once the AI detects a human has answered the call, it will call this number. - Must follow the same formatting as `phone_number` + Once the AI detects a human has answered the call, it will call this number. Must follow the same formatting as + `phone_number` - By default, the AI will wait on hold, then call you when a human answers. If - you want the AI to first ask the other human a few questions, or want to give - it special rules about when to patch you into the phone call, provide those + By default, the AI will wait on hold, then call you when a human answers. If you want the AI to first ask the other + human a few questions, or want to give it special rules about when to patch you into the phone call, provide those instructions here. @@ -55,12 +52,3 @@ slug: api-reference/endpoint/hold ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/inbound_prompt.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/inbound_prompt.mdx index 5cc7112a39..786961227d 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/inbound_prompt.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/inbound_prompt.mdx @@ -14,20 +14,18 @@ slug: api-reference/endpoint/inbound_prompt ### Body - The phone number associated with the prompt. - Format: "+XXXXXXXXXX" or - "+XXX-XXX-XXXX". Make sure to include the exact phone number (area code and "+" included). Otherwise the update will fail. + The phone number associated with the prompt. - Format: "+XXXXXXXXXX" or "+XXX-XXX-XXXX". Make sure to include the + exact phone number (area code and "+" included). Otherwise the update will fail. - The new prompt for the given phone number. The prompt shouldn't exceed 5000 - characters. Note: Ensure the prompt is clear and relevant to your use case. + The new prompt for the given phone number. The prompt shouldn't exceed 5000 characters. Note: Ensure the prompt is + clear and relevant to your use case. - Set a custom voice for your agent. Matches the voices in the /call endpoint. - - 0: British Female (default) - - 1: Australian Female - - 2: American Male + Set a custom voice for your agent. Matches the voices in the /call endpoint. - 0: British Female (default) - 1: + Australian Female - 2: American Male ### Response @@ -37,8 +35,7 @@ slug: api-reference/endpoint/inbound_prompt - The creation timestamp of the inbound record. - Example: - "2023-10-10T12:00:00Z" + The creation timestamp of the inbound record. - Example: "2023-10-10T12:00:00Z" @@ -66,12 +63,3 @@ slug: api-reference/endpoint/inbound_prompt ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/logs.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/logs.mdx index ac31309883..d68a506532 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/logs.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/logs.mdx @@ -22,14 +22,8 @@ slug: api-reference/endpoint/logs ### Response - An array of phrases spoken during the call. - - Each index includes: - - - `id` - - `created_at` - - `text` - - `user` (can be `user`, `assistant`, `robot`, or `agent-action`) + An array of phrases spoken during the call. Each index includes: - `id` - `created_at` - `text` - `user` (can be + `user`, `assistant`, `robot`, or `agent-action`) @@ -49,28 +43,30 @@ slug: api-reference/endpoint/logs - Whether the call has been completed. If it differs from the value of 'queue_status', this will be the most up-to-date status. + Whether the call has been completed. If it differs from the value of 'queue_status', this will be the most up-to-date + status. The status of the call. During extremely high volume periods, calls may be queued for a short period of time before being dispatched. - Progresses through the following stages: +Progresses through the following stages: - - `new`: An API request has been received. - - `queued`: Call pararameters have been validated and authentication succeeded. - - `allocated`: Extremely brief, the call is being dispatched. - - `started`: The phone call is live and in progress. - - `complete`: The phone call has ended successfully. - - The following statuses show the point that was reached before an error: +- `new`: An API request has been received. +- `queued`: Call pararameters have been validated and authentication succeeded. +- `allocated`: Extremely brief, the call is being dispatched. +- `started`: The phone call is live and in progress. +- `complete`: The phone call has ended successfully. - - `pre_queue_error`: An error occurred before the call was queued. Invalid parameters generally cause this. - - `queue_error`: Error occurred while the call was queued. Ex. Valid phone number but to an unserviced area. - - `call_error`: Error occurred during live call. May be caused by transferring to an invalid phone number or an unforeseen error. - - `complete_error`: Error occurred after the call was completed. Ex. A post-call webhook failed. +The following statuses show the point that was reached before an error: + +- `pre_queue_error`: An error occurred before the call was queued. Invalid parameters generally cause this. +- `queue_error`: Error occurred while the call was queued. Ex. Valid phone number but to an unserviced area. +- `call_error`: Error occurred during live call. May be caused by transferring to an invalid phone number or an unforeseen error. +- `complete_error`: Error occurred after the call was completed. Ex. A post-call webhook failed. + +If at any point an error occurs, it will be recorded in the `error_message` field. - If at any point an error occurs, it will be recorded in the `error_message` field. @@ -86,7 +82,8 @@ slug: api-reference/endpoint/logs - The total length of time the call was connected. This differs from call_length in that it includes ringing and connection time. + The total length of time the call was connected. This differs from call_length in that it includes ringing and + connection time. @@ -97,7 +94,6 @@ slug: api-reference/endpoint/logs The timestamp for when the call was dispatched. - # Polling example To track the status of a live phone call, you can use a 'polling' technique to repeatedly ping the logs endpoint. @@ -170,10 +166,10 @@ while True: "error_message": null, "endpoint_url": "api.bland.ai", "request_data": { - "phone_number": "1112223344", - "reduce_latency": false, - "wait": false, - "language": "ENG" + "phone_number": "1112223344", + "reduce_latency": false, + "wait": false, + "language": "ENG" }, "completed": true, "created_at": "2023-09-22T19:14:27.015663+00:00", @@ -219,12 +215,3 @@ while True: ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/purchase.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/purchase.mdx index 02112db3a4..e2ff379540 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/purchase.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/purchase.mdx @@ -15,24 +15,25 @@ slug: api-reference/endpoint/purchase ### Body - Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact match if available. + Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact + match if available. - This defines how the AI will start the conversation, information available to - it, and its behaviors. Matches how the outbound `task` parameter functions. + This defines how the AI will start the conversation, information available to it, and its behaviors. Matches how the + outbound `task` parameter functions. - The webhook should be a http / https callback url. We will send the call_id - and transcript to this URL after the call completes. This can be useful if you - want to have real time notifications when calls finish. + The webhook should be a http / https callback url. We will send the call_id and transcript to this URL after the call + completes. This can be useful if you want to have real time notifications when calls finish. Specify an exact phone number you'd like to use. If provided, will override the `area_code` parameter and does not fallback to any other number. - Example of the correct format (Note the `"+1"` is mandatory): `"+12223334444"` +Example of the correct format (Note the `"+1"` is mandatory): `"+12223334444"` + ### Response @@ -40,7 +41,8 @@ slug: api-reference/endpoint/purchase The created phone number, will be in the following format: `+1XXXXXXXXXX` - Example: `+18582814611` +Example: `+18582814611` + @@ -52,12 +54,3 @@ slug: api-reference/endpoint/purchase ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/recording.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/recording.mdx index 21f0588081..0731e311da 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/recording.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/endpoint/recording.mdx @@ -23,8 +23,8 @@ slug: api-reference/endpoint/recording - If the status is `success`, the `url` field will be present. - Otherwise if the status is `error`, the message will say "Error fetching recording" or "Internal server error". + If the status is `success`, the `url` field will be present. Otherwise if the status is `error`, the message will say + "Error fetching recording" or "Internal server error". @@ -48,12 +48,3 @@ slug: api-reference/endpoint/recording ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/hold-endpoint/hold.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/hold-endpoint/hold.mdx index a2a7658854..36243fdc12 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/hold-endpoint/hold.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-reference/hold-endpoint/hold.mdx @@ -16,22 +16,19 @@ slug: api-reference/hold-endpoint/hold ### Body - This is the phone number of the person or company you want to call. - - International numbers: must include the country code and may not include - additional formatting (like parentheses and dashes). E.g. '+447700900077'. - - U.S. numbers: may include formatting, but we recommend stripping all - additional characters. + This is the phone number of the person or company you want to call. - International numbers: must include the country + code and may not include additional formatting (like parentheses and dashes). E.g. '+447700900077'. - U.S. numbers: + may include formatting, but we recommend stripping all additional characters. - Once the AI detects a human has answered the call, it will call this number. - Must follow the same formatting as `phone_number` + Once the AI detects a human has answered the call, it will call this number. Must follow the same formatting as + `phone_number` - By default, the AI will wait on hold, then call you when a human answers. If - you want the AI to first ask the other human a few questions, or want to give - it special rules about when to patch you into the phone call, provide those + By default, the AI will wait on hold, then call you when a human answers. If you want the AI to first ask the other + human a few questions, or want to give it special rules about when to patch you into the phone call, provide those instructions here. @@ -55,12 +52,3 @@ slug: api-reference/hold-endpoint/hold ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/agents.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/agents.mdx index 6918a7b99c..3d96b4bd27 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/agents.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/agents.mdx @@ -14,20 +14,14 @@ slug: api-v1/get/agents ### Response - Each agent object, containing the following fields: - - `agent_id` (string): The unique identifier for the agent. - - `webhook` (string): The webhook URL for the agent. - - `dynamic_data` (array): An array of dynamic data objects. - - `interruption_threshold` (number): The threshold for agent interruption. - - `first_sentence` (string): The first sentence the agent will say. - - `model` (string): The model used by the agent. - - `voice_settings` (object): The voice settings for the agent. - - `voice` (string): The voice used by the agent. - - `prompt` (string): The prompt for the agent. - - `temperature` (number): The temperature setting for the agent. - - `max_duration` (number): The maximum call duration for the agent. - - `language` (string): The language used by the agent. - - `tools` (array): An array of Custom Tools the agent can use. + Each agent object, containing the following fields: - `agent_id` (string): The unique identifier for the agent. - + `webhook` (string): The webhook URL for the agent. - `dynamic_data` (array): An array of dynamic data objects. - + `interruption_threshold` (number): The threshold for agent interruption. - `first_sentence` (string): The first + sentence the agent will say. - `model` (string): The model used by the agent. - `voice_settings` (object): The voice + settings for the agent. - `voice` (string): The voice used by the agent. - `prompt` (string): The prompt for the + agent. - `temperature` (number): The temperature setting for the agent. - `max_duration` (number): The maximum call + duration for the agent. - `language` (string): The language used by the agent. - `tools` (array): An array of Custom + Tools the agent can use. @@ -55,3 +49,4 @@ slug: api-v1/get/agents ``` +``` diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id-analysis.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id-analysis.mdx index a419b56557..3bd3d5cccb 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id-analysis.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id-analysis.mdx @@ -30,14 +30,9 @@ slug: api-v1/get/batches-id-analysis - An array of analysis objects, each corresponding to a call within the batch. - - Each analysis object includes: - - `call_id`, - - `batch_id` - - `goal` - - `answers` - the results of the AI analysis - - `questions` - the original questions asked by the AI + An array of analysis objects, each corresponding to a call within the batch. Each analysis object includes: - + `call_id`, - `batch_id` - `goal` - `answers` - the results of the AI analysis - `questions` - the original questions + asked by the AI @@ -68,10 +63,3 @@ slug: api-v1/get/batches-id-analysis } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id.mdx index f5e5d3e245..0e023511ec 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches-id.mdx @@ -61,7 +61,6 @@ slug: api-v1/get/batches-id An object containing parameters for the calls in the batch. - An object containing analysis data for the batch. @@ -81,24 +80,26 @@ slug: api-v1/get/batches-id An object containing the number of calls in each queue status. - Example: - ```json - { - "complete": 237, - "queued": 2, - "call_error": 1 - } - ``` +Example: + +```json +{ + "complete": 237, + "queued": 2, + "call_error": 1 +} +``` + Contains `average`, `average_nonzero`, `summary` and `all` fields. - - `average`: The average call length in minutes. - - `average_nonzero`: The average call length in minutes, excluding calls with a length of less than one second. - - `summary`: A summary of the call lengths, grouped into ranges. - - `all`: Contains each call length, in case you want to use a different grouping than the default. - +- `average`: The average call length in minutes. +- `average_nonzero`: The average call length in minutes, excluding calls with a length of less than one second. +- `summary`: A summary of the call lengths, grouped into ranges. +- `all`: Contains each call length, in case you want to use a different grouping than the default. + Contains each `call_id` in the batch. @@ -107,15 +108,17 @@ slug: api-v1/get/batches-id Contains any error messages that calls in the batch may have. - Example: - ```json - [ - { - "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", - "error_message": "Cannot transfer to +12223334444 - Call is no longer active" - } - ] - ``` +Example: + +```json +[ + { + "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", + "error_message": "Cannot transfer to +12223334444 - Call is no longer active" + } +] +``` + @@ -153,13 +156,14 @@ slug: api-v1/get/batches-id Contains a string value if the batch had `answered_by_enabled` set to true. - Values: - - `voicemail` - - `human` - - `unknown` - - `no-answer` - - `null` - +Values: + +- `voicemail` +- `human` +- `unknown` +- `no-answer` +- `null` + @@ -181,108 +185,98 @@ slug: api-v1/get/batches-id } }, "call_data": [ - { - "status": "completed", - "corrected_duration": "12", - "end_at": "2023-12-16T00:17:38.000Z", - "call_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e", - "to": "1112223333", - "from": "+17473423273", - "completed": true, - "created_at": "2023-12-16T00:17:22.383682+00:00", - "queue_status": "complete", - "endpoint_url": "api.bland.ai", - "max_duration": 30, - "error_message": null, - "answered_by": "voicemail", - "request_data": { - "phone_number": "1112223333", - "reduce_latency": true, - "wait": false, - "language": "ENG" - }, - "transcripts": [ - { - "id": 1188954, - "created_at": "2023-12-16T00:17:30.46833+00:00", - "text": " Hi, Im calling about the laundromat for sale. —  ", - "user": "assistant", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - }, - { - "id": 1188957, - "created_at": "2023-12-16T00:17:35.14056+00:00", - "text": "I'll get back to you as soon as you can. Just leave a message. Thank you. Bye.", - "user": "user", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - }, - { - "id": 1188959, - "created_at": "2023-12-16T00:17:36.710551+00:00", - "text": "Ended call: Goodbye", - "user": "agent-action", - "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" - } - ], - "call_length": 0.12345 - }, - //... - ], - "analysis": { - "total_calls": 88, - "completed_calls": 86, - "in_progress_calls": 2, - "queue_statuses": { - "complete": 85, - "started": 2, - "call_error": 1 - }, - "call_lengths": { - "average": 17, - "average_nonzero": 31, - "summary": { - "0-5": 18, - "5-10": 4, - "10-15": 3, - "15-20": 2, - "20-30": 14, - "30-45": 28, - "45-60": 11, - "60-90": 6, - "90-120": 1, - "120+": 1 - }, - "all": [ - 7, - 32, - //... - ] + { + "status": "completed", + "corrected_duration": "12", + "end_at": "2023-12-16T00:17:38.000Z", + "call_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e", + "to": "1112223333", + "from": "+17473423273", + "completed": true, + "created_at": "2023-12-16T00:17:22.383682+00:00", + "queue_status": "complete", + "endpoint_url": "api.bland.ai", + "max_duration": 30, + "error_message": null, + "answered_by": "voicemail", + "request_data": { + "phone_number": "1112223333", + "reduce_latency": true, + "wait": false, + "language": "ENG" }, - "call_ids": [ - "ffa99be3-63dd-44dc-9523-380cd25c1b9e", - "591338a8-34b2-41e6-93da-b9029c9bdedc", - //... - ], - "error_messages": [ + "transcripts": [ + { + "id": 1188954, + "created_at": "2023-12-16T00:17:30.46833+00:00", + "text": " Hi, Im calling about the laundromat for sale. —  ", + "user": "assistant", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" + }, + { + "id": 1188957, + "created_at": "2023-12-16T00:17:35.14056+00:00", + "text": "I'll get back to you as soon as you can. Just leave a message. Thank you. Bye.", + "user": "user", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" + }, { - "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", - "error_message": "Cannot transfer to +12223334444 - Call is no longer active" + "id": 1188959, + "created_at": "2023-12-16T00:17:36.710551+00:00", + "text": "Ended call: Goodbye", + "user": "agent-action", + "c_id": "ffa99be3-63dd-44dc-9523-380cd25c1b9e" } ], - "endpoints": { - "api.bland.ai": 88 + "call_length": 0.12345 + } + //... + ], + "analysis": { + "total_calls": 88, + "completed_calls": 86, + "in_progress_calls": 2, + "queue_statuses": { + "complete": 85, + "started": 2, + "call_error": 1 + }, + "call_lengths": { + "average": 17, + "average_nonzero": 31, + "summary": { + "0-5": 18, + "5-10": 4, + "10-15": 3, + "15-20": 2, + "20-30": 14, + "30-45": 28, + "45-60": 11, + "60-90": 6, + "90-120": 1, + "120+": 1 + }, + "all": [ + 7, 32 + //... + ] + }, + "call_ids": [ + "ffa99be3-63dd-44dc-9523-380cd25c1b9e", + "591338a8-34b2-41e6-93da-b9029c9bdedc" + //... + ], + "error_messages": [ + { + "call_id": "c52f5f8c-147e-478c-4b40-88214feeba29", + "error_message": "Cannot transfer to +12223334444 - Call is no longer active" } + ], + "endpoints": { + "api.bland.ai": 88 + } } } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches.mdx index cb952b60a9..0a05d93b55 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/batches.mdx @@ -48,8 +48,8 @@ slug: api-v1/get/batches - The original base prompt used to create the batch. Will still contain the - original placeholder variables such as `{{ business }}` or `{{ name }}`. + The original base prompt used to create the batch. Will still contain the original placeholder variables such as ` + {{ business }}` or `{{ name }}`. @@ -57,13 +57,12 @@ slug: api-v1/get/batches - Enterprise customers with custom endpoints will see the endpoint code here (if - specified). + Enterprise customers with custom endpoints will see the endpoint code here (if specified). - The base call parameters used to create the batch, such as `voice_id`, - `max_duration`, `reduce_latency`, and `wait_for_greeting`. + The base call parameters used to create the batch, such as `voice_id`, `max_duration`, `reduce_latency`, and + `wait_for_greeting`. @@ -99,12 +98,3 @@ slug: api-v1/get/batches } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-corrected-transcript.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-corrected-transcript.mdx index 7982fb808b..d23d6a8811 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-corrected-transcript.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-corrected-transcript.mdx @@ -17,7 +17,6 @@ slug: api-v1/get/calls-corrected-transcript The unique identifier for the call to be corrected. - ### Response @@ -40,11 +39,12 @@ This will contain an array of objects. Each object will be constructed as the fo ``` -Corrected transcripts provides us with a raw output that is generally unusable because we can't eveen neccessarily align the 'assistant' and 'user' roles. To fix this, we provide our version of an 'aligned' transcript. This means essentailly a transcript where the roles are matched to the pieces of text. +Corrected transcripts provides us with a raw output that is generally unusable because we can't eveen neccessarily align the 'assistant' and 'user' roles. To fix this, we provide our version of an 'aligned' transcript. This means essentailly a transcript where the roles are matched to the pieces of text. We do this by vectorizing the text, taking the cosine similarity, and adding a predictive layer based off of the `wait_for_greeting` param (essentially how sure are we that assistant or user spoke first). -This will contain an array of objects. Each object will be constructed as the following. +This will contain an array of objects. Each object will be constructed as the following. + ```json { "id": 3056004, @@ -54,6 +54,7 @@ This will contain an array of objects. Each object will be constructed as the fo "c_id": "bfaf99a1-b7c0-4f96-9630-90bc41cea488" }, ``` + @@ -340,10 +341,3 @@ This will contain an array of objects. Each object will be constructed as the fo } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id-recording.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id-recording.mdx index e1b2702d59..bf7f0c695e 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id-recording.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id-recording.mdx @@ -32,14 +32,14 @@ slug: api-v1/get/calls-id-recording A 404 error will be returned if the call does not exist or the recording is not available. We can only retrieve recordings if the call was created with `record` set to `true`. - A 400/500 error will be returned if there is an error retrieving the recording. +A 400/500 error will be returned if there is an error retrieving the recording. + If the status is `success`, the `url` will provide the exact location of the MP3 file storing the call's audio. - ```json Success response @@ -61,10 +61,3 @@ slug: api-v1/get/calls-id-recording ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id.mdx index 4a5cbe303a..ce18f9cdff 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls-id.mdx @@ -20,14 +20,8 @@ slug: api-v1/get/calls-id ### Response - An array of phrases spoken during the call. - - Each index includes: - - - `id` - - `created_at` - - `text` - - `user` (can be `user`, `assistant`, `robot`, or `agent-action`) + An array of phrases spoken during the call. Each index includes: - `id` - `created_at` - `text` - `user` (can be + `user`, `assistant`, `robot`, or `agent-action`) @@ -37,7 +31,8 @@ slug: api-v1/get/calls-id Variables created during the call - both system variables as well as generated with `dynamic_data`. - For example, if you used a `dynamic_data` API request to generate a variable called `appointment_time`, you would see it here. +For example, if you used a `dynamic_data` API request to generate a variable called `appointment_time`, you would see it here. + @@ -61,28 +56,30 @@ slug: api-v1/get/calls-id - Whether the call has been completed. If it differs from the value of 'queue_status', this will be the most up-to-date status. + Whether the call has been completed. If it differs from the value of 'queue_status', this will be the most up-to-date + status. The status of the call. During extremely high volume periods, calls may be queued for a short period of time before being dispatched. - Progresses through the following stages: +Progresses through the following stages: + +- `new`: An API request has been received. +- `queued`: Call pararameters have been validated and authentication succeeded. +- `allocated`: Extremely brief, the call is being dispatched. +- `started`: The phone call is live and in progress. +- `complete`: The phone call has ended successfully. - - `new`: An API request has been received. - - `queued`: Call pararameters have been validated and authentication succeeded. - - `allocated`: Extremely brief, the call is being dispatched. - - `started`: The phone call is live and in progress. - - `complete`: The phone call has ended successfully. - - The following statuses show the point that was reached before an error: +The following statuses show the point that was reached before an error: - - `pre_queue_error`: An error occurred before the call was queued. Invalid parameters generally cause this. - - `queue_error`: Error occurred while the call was queued. Ex. Valid phone number but to an unserviced area. - - `call_error`: Error occurred during live call. May be caused by transferring to an invalid phone number or an unforeseen error. - - `complete_error`: Error occurred after the call was completed. Ex. A post-call webhook failed. +- `pre_queue_error`: An error occurred before the call was queued. Invalid parameters generally cause this. +- `queue_error`: Error occurred while the call was queued. Ex. Valid phone number but to an unserviced area. +- `call_error`: Error occurred during live call. May be caused by transferring to an invalid phone number or an unforeseen error. +- `complete_error`: Error occurred after the call was completed. Ex. A post-call webhook failed. + +If at any point an error occurs, it will be recorded in the `error_message` field. - If at any point an error occurs, it will be recorded in the `error_message` field. @@ -92,21 +89,19 @@ slug: api-v1/get/calls-id If `answered_by_enabled` was set to `true` in the original API request, this field contains one of the following values: - - `human`: The call was answered by a human. - - `voicemail`: The call was answered by an answering machine or voicemail. - - `unknown`: There was not enough audio at the start of the call to make a determination. - - `no-answer`: The call was not answered. - - `null`: Not enabled, or still processing the result. +- `human`: The call was answered by a human. +- `voicemail`: The call was answered by an answering machine or voicemail. +- `unknown`: There was not enough audio at the start of the call to make a determination. +- `no-answer`: The call was not answered. +- `null`: Not enabled, or still processing the result. + + - - Determinations are based on audio from the first five seconds of the phone call. - `unknown` is most likely a human, especially if there are multiple transcripts. - - Optimize calls for accurate results by getting humans to respond in the first five seconds: - - Increase `speed` in `voice_settings` - - Use with `wait_for_greeting` - - Use a short greeting in `first_sentence` such as "Hello?" or "Hi, is this \{\{name\}\}?" - - + - Optimize calls for accurate results by getting humans to respond in the first five seconds: - Increase `speed` in `voice_settings` - Use with `wait_for_greeting` - Use a short greeting in `first_sentence` such as "Hello?" or "Hi, is this \{\{name\}\}?" + + The URL that was called to dispatch the phone call. @@ -117,7 +112,8 @@ slug: api-v1/get/calls-id - The total length of time the call was connected. This differs from call_length in that it includes ringing and connection time. + The total length of time the call was connected. This differs from call_length in that it includes ringing and + connection time. @@ -204,12 +200,3 @@ slug: api-v1/get/calls-id } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls.mdx index 223217c408..ddd0968cb4 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/calls.mdx @@ -16,13 +16,15 @@ slug: api-v1/get/calls Filter calls by the number they were dispatched from. - The number that initiated the call - the user's phone number for inbound calls, or the number your AI Agent called from for outbound calls. +The number that initiated the call - the user's phone number for inbound calls, or the number your AI Agent called from for outbound calls. + Filter calls by the number they were dispatched to. - The number that answered the call - the user's phone number for outbound calls, or your AI Agent's number for inbound calls. +The number that answered the call - the user's phone number for outbound calls, or your AI Agent's number for inbound calls. + @@ -50,7 +52,8 @@ slug: api-v1/get/calls An array of call data objects. See the [Call](calls-id.mdx) section for details. - Note: Individual call transcripts are not included due to their size. +Note: Individual call transcripts are not included due to their size. + @@ -75,11 +78,3 @@ slug: api-v1/get/calls } ``` - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound-number.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound-number.mdx index c2b536d1d8..0cdae52dfa 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound-number.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound-number.mdx @@ -24,6 +24,7 @@ slug: api-v1/get/inbound-number - `%2B13334445555` - `13334445555` - `3334445555` + ### Response @@ -45,13 +46,12 @@ slug: api-v1/get/inbound-number - The `voice` your agent is using - will be a `reduce_latency` voice. - - For more information, see [List Voices](voices.mdx). + The `voice` your agent is using - will be a `reduce_latency` voice. For more information, see [List + Voices](voices.mdx). - The `pathway_id` your agent is using. + The `pathway_id` your agent is using. @@ -76,11 +76,3 @@ slug: api-v1/get/inbound-number } ``` - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound.mdx index c1720222b7..ae7030cb0f 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/inbound.mdx @@ -15,7 +15,7 @@ slug: api-v1/get/inbound Use your own Twilio account and only return inbound numbers associated with that account sid (optional). - +{" "} ### Response @@ -71,3 +71,4 @@ slug: api-v1/get/inbound +``` diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/me.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/me.mdx index 2c4a9dd555..29b84a897f 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/me.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/me.mdx @@ -14,16 +14,16 @@ slug: api-v1/get/me ### Response -An object containing your billing data. -Contains `current_balance` (number of credits), and `refill_to` if you have auto refill enabled. + An object containing your billing data. Contains `current_balance` (number of credits), and `refill_to` if you have + auto refill enabled. -The status of your account. + The status of your account. -The total number of calls you've made. + The total number of calls you've made. @@ -38,11 +38,3 @@ The total number of calls you've made. } ``` - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/outbound.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/outbound.mdx index 2a01c86538..c50faeb9d0 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/outbound.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/outbound.mdx @@ -23,23 +23,15 @@ slug: api-v1/get/outbound ```json Response { - "outbound_numbers": [ - { - "created_at": "2023-11-27T17:21:38.33359+00:00", - "phone_number": "+18005551234", - "last_initiated": "2023-12-08T21:47:49.808+00:00" - }, - //... - ] + "outbound_numbers": [ + { + "created_at": "2023-11-27T17:21:38.33359+00:00", + "phone_number": "+18005551234", + "last_initiated": "2023-12-08T21:47:49.808+00:00" + } + //... + ] } - ``` - - - - - - - - + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts-id.mdx index 312f74a67c..3b75474647 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts-id.mdx @@ -12,21 +12,23 @@ slug: api-v1/get/subaccounts-id ### Path Parameters + - The unique identifier of the subaccount. + The unique identifier of the subaccount. ### Response + - Whether the subaccount creation succeeded. + Whether the subaccount creation succeeded. - The affected subaccount's unique identifier. + The affected subaccount's unique identifier. - The new API key for the subaccount. + The new API key for the subaccount. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts.mdx index d3150c5266..133586caf5 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/subaccounts.mdx @@ -12,12 +12,13 @@ slug: api-v1/get/subaccounts ### Response + - Whether the subaccount creation succeeded. + Whether the subaccount creation succeeded. - An array of your subaccounts. + An array of your subaccounts. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools-tool-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools-tool-id.mdx index c60700bb48..1c52c180aa 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools-tool-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools-tool-id.mdx @@ -12,18 +12,19 @@ slug: api-v1/get/tools-tool-id ### Path Parameters + - The ID of the tool you want to retrieve (starting with `TL-`). + The ID of the tool you want to retrieve (starting with `TL-`). ### Response - Whether the requet succeeded or failed. + Whether the requet succeeded or failed. - The tool you've created. + The tool you've created. @@ -67,4 +68,3 @@ slug: api-v1/get/tools-tool-id } ``` - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools.mdx index 0fa4b78481..8f9fd57df1 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/tools.mdx @@ -14,11 +14,11 @@ slug: api-v1/get/tools ### Response - Whether the requet succeeded or failed. + Whether the requet succeeded or failed. - An array of your available tools. + An array of your available tools. @@ -65,4 +65,3 @@ slug: api-v1/get/tools } ``` - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices-id.mdx index 40231b3bbf..1327268281 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices-id.mdx @@ -16,9 +16,10 @@ slug: api-v1/get/voices-id The unique identifier for the voice preset. - Place either the voice's `name` or `id` here. +Place either the voice's `name` or `id` here. + +For example, `GET https://api.bland.ai/v1/voices/david` or `GET https://api.bland.ai/v1/voices/ff2c405b-3dba-41e0-9261-bc8ee3f91f46`. - For example, `GET https://api.bland.ai/v1/voices/david` or `GET https://api.bland.ai/v1/voices/ff2c405b-3dba-41e0-9261-bc8ee3f91f46`. ### Response @@ -36,6 +37,7 @@ slug: api-v1/get/voices-id - `total_ratings` - The number of ratings for the voice. Note: Ratings are under development and may show incomplete or inaccurate data. + @@ -57,10 +59,3 @@ slug: api-v1/get/voices-id } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices.mdx index 5ada09ce40..6c815dcfb9 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/get/voices.mdx @@ -45,6 +45,7 @@ slug: api-v1/get/voices Note: Ratings are under development at this time and may display incomplete/inaccurate data. + @@ -97,10 +98,3 @@ slug: api-v1/get/voices } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts-delete.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts-delete.mdx index 17e948473a..02a1985863 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts-delete.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts-delete.mdx @@ -24,13 +24,13 @@ slug: api-v1/post/accounts-delete - `success` - The encrypted key was successfully deleted. - `error` - There was an error deleting the encrypted key. + - Special messages: - - `Error deleting Twilio credentials` - The encrypted key could not be deleted or already has been deleted. - - `Missing encrypted key` - The `encrypted_key` parameter is missing. - - none - The encrypted key was successfully deleted. + Special messages: - `Error deleting Twilio credentials` - The encrypted key could not be deleted or already has been + deleted. - `Missing encrypted key` - The `encrypted_key` parameter is missing. - none - The encrypted key was + successfully deleted. @@ -39,4 +39,4 @@ slug: api-v1/post/accounts-delete "status": "success" } ``` - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts.mdx index 5f86dd8af9..4c410d20ab 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/accounts.mdx @@ -16,17 +16,17 @@ slug: api-v1/post/accounts ### Body - Your Twilio account SID. + Your Twilio account SID. - Your Twilio auth token. + Your Twilio auth token. ### Response - Your `encrypted_key` to store and use in future requests. + Your `encrypted_key` to store and use in future requests. @@ -36,4 +36,4 @@ slug: api-v1/post/accounts "encrypted_key": "YOUR_ENCRYPTED_KEY" } ``` - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id-authorize.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id-authorize.mdx index bdd485ae78..b010a17474 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id-authorize.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id-authorize.mdx @@ -10,24 +10,21 @@ slug: api-v1/post/agents-id-authorize Your API key for authentication. - Example web call usage (client side): -```javascript -import { BlandWebClient } from 'bland-client-js-sdk'; +Example web call usage (client side): -const agentId = 'YOUR-AGENT-ID'; -const sessionToken = 'YOUR-SESSION-TOKEN'; +```javascript +import { BlandWebClient } from "bland-client-js-sdk"; +const agentId = "YOUR-AGENT-ID"; +const sessionToken = "YOUR-SESSION-TOKEN"; -document.addEventListener('DOMContentLoaded', async () => { - document.getElementById('btn').addEventListener('click', async () => { - const blandClient = new BlandWebClient( - agentId, - sessionToken - ); - await blandClient.initConversation({ - sampleRate: 44100, - }); +document.addEventListener("DOMContentLoaded", async () => { + document.getElementById("btn").addEventListener("click", async () => { + const blandClient = new BlandWebClient(agentId, sessionToken); + await blandClient.initConversation({ + sampleRate: 44100, }); + }); }); ``` @@ -38,7 +35,8 @@ document.addEventListener('DOMContentLoaded', async () => { The web agent to authorize a call for. - Special note: While in Beta, this request must be made to the `web.bland.ai` domain. +Special note: While in Beta, this request must be made to the `web.bland.ai` domain. + ### Response diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id.mdx index b8b6d23dc5..a761e725d7 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents-id.mdx @@ -14,13 +14,13 @@ slug: api-v1/post/agents-id ### Path Parameters - The web agent you'll be updating. + The web agent you'll be updating. ### Body - Provide instructions, relevant information, and examples of the ideal conversation flow. + Provide instructions, relevant information, and examples of the ideal conversation flow. #### Out-of-the-Box Behaviors (Summarized): @@ -33,11 +33,12 @@ slug: api-v1/post/agents-id - [Try out Agent Testing!](https://app.bland.ai/home?page=testing) - Aim for less than >2,000 characters where possible. - Simple, direct prompts are the most predictable and reliable. - - Frame instructions positively: - - `"Do this"` rather than `"Don't do this"`. + - Frame instructions positively: + - `"Do this"` rather than `"Don't do this"`. - Ex. "Keep the conversation casual" rather than "Don't be too formal". - This gives concrete examples of what to do, instead of leaving expected behavior open to interpretation. + @@ -47,35 +48,37 @@ slug: api-v1/post/agents-id Define a JSON schema for how you want to get information about the call - information like email addresses, names, appointment times or any other type of custom data. - In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. +In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. - For example, if you wanted to retrieve this information from the call: +For example, if you wanted to retrieve this information from the call: - ```json - "analysis_schema": { - "email_address": "email", - "first_name": "string", - "last_name": "string", - "wants_to_book_appointment": "boolean", - "appointment_time": "YYYY-MM-DD HH:MM:SS" - } - ``` +```json +"analysis_schema": { + "email_address": "email", + "first_name": "string", + "last_name": "string", + "wants_to_book_appointment": "boolean", + "appointment_time": "YYYY-MM-DD HH:MM:SS" +} +``` - You would get it filled out like this in your webhook once the call completes: +You would get it filled out like this in your webhook once the call completes: + +```json +"analysis": { + "email_address": "johndoe@gmail.com", + "first_name": "John", + "last_name": "Doe", + "wants_to_book_appointment": true, + "appointment_time": "2024-01-01 12:00:00" +} +``` - ```json - "analysis": { - "email_address": "johndoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "wants_to_book_appointment": true, - "appointment_time": "2024-01-01 12:00:00" - } - ``` - Add any additional information you want to associate with the call. This can be useful for tracking or categorizing calls. + Add any additional information you want to associate with the call. This can be useful for tracking or categorizing + calls. @@ -88,18 +91,10 @@ slug: api-v1/post/agents-id - Select a supported language of your choice. - Optimizes every part of our API for that language - transcription, speech, and other inner workings. - - Supported Languages and their codes: - - English: ```ENG``` - - Spanish: ```ESP``` - - French: ```FRE``` - - Polish: ```POL``` - - German: ```GER``` - - Italian: ```ITA``` - - Brazilian Portuguese: ```PBR``` - - Portuguese: ```POR``` + Select a supported language of your choice. Optimizes every part of our API for that language - transcription, speech, + and other inner workings. Supported Languages and their codes: - English: ```ENG``` - Spanish: ```ESP``` - French: + ```FRE``` - Polish: ```POL``` - German: ```GER``` - Italian: ```ITA``` - Brazilian Portuguese: ```PBR``` - Portuguese: + ```POR``` @@ -107,69 +102,79 @@ slug: api-v1/post/agents-id and transcript to this URL after the call completes. This can be useful if you want to have real time notifications when calls finish. - Set to `null` or an empty string to clear the webhook. +Set to `null` or an empty string to clear the webhook. + Select a model to use for your call. - Options: `base`, `turbo` and `enhanced`. +Options: `base`, `turbo` and `enhanced`. - In nearly all cases, `enhanced` is the best choice for now. +In nearly all cases, `enhanced` is the best choice for now. - There are three different ways to use Bland: +There are three different ways to use Bland: - - `model: base` - - The original, follows scripts/procedures most effectively. - - Supports all features and capabilities. - - Best for Custom Tools - - - `model: enhanced` - - Much faster latency and very conversational, works best with objective-based prompts. - - Supports all features and capabilities. +- `model: base` - - `model: turbo` - - The absolute fastest latency possible, can be verbose at times - - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) - - Extremely realistic conversation capabilities + - The original, follows scripts/procedures most effectively. + - Supports all features and capabilities. + - Best for Custom Tools - - +- `model: enhanced` + + - Much faster latency and very conversational, works best with objective-based prompts. + - Supports all features and capabilities. + +- `model: turbo` + + - The absolute fastest latency possible, can be verbose at times + - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) + - Extremely realistic conversation capabilities + + + + A phrase that your call will start with instead of a generating one on the fly. This works both with and without `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. - To remove, set to `null` or an empty string. +To remove, set to `null` or an empty string. + Interact with the real world through API calls. - Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) +Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) + - Integrate data from external APIs into your agent's knowledge. + Integrate data from external APIs into your agent's knowledge. - Set to `null` or an empty string to clear dynamic data settings. +Set to `null` or an empty string to clear dynamic data settings. + +Detailed usage in the [Send Call](calls.mdx) endpoint. - Detailed usage in the [Send Call](calls.mdx) endpoint. When you increase the interruption latency, you force the AI phone agent to listen longer before responding. In practice, increasing the threshold results in less interruptions and more latency. - Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. +Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. + +Set to `null` to reset to default. - Set to `null` to reset to default. The maximum duration that calls to your agent can last before being automatically terminated. - Set to `null` to reset to default. +Set to `null` to reset to default. + ### Response @@ -187,20 +192,20 @@ slug: api-v1/post/agents-id - If the update was unsuccessful, this will contain the settings that failed to update. Useful to determine how your request is being interpreted on our end. + If the update was unsuccessful, this will contain the settings that failed to update. Useful to determine how your + request is being interpreted on our end. ```json Response { - "status": "success", - "message": "Successfully updated agent 46f37229-7d12-44be-b343-6e68274cfbea.", - "updates": { - "model": "enhanced" - } + "status": "success", + "message": "Successfully updated agent 46f37229-7d12-44be-b343-6e68274cfbea.", + "updates": { + "model": "enhanced" + } } ``` - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents.mdx index 142ed7e1fa..bb7c789319 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/agents.mdx @@ -11,23 +11,20 @@ slug: api-v1/post/agents Your API key for authentication. Example web call usage (client side): -```javascript -import { BlandWebClient } from 'bland-client-js-sdk'; -const agentId = 'YOUR-AGENT-ID'; -const sessionToken = 'YOUR-SESSION-TOKEN'; +```javascript +import { BlandWebClient } from "bland-client-js-sdk"; +const agentId = "YOUR-AGENT-ID"; +const sessionToken = "YOUR-SESSION-TOKEN"; -document.addEventListener('DOMContentLoaded', async () => { - document.getElementById('btn').addEventListener('click', async () => { - const blandClient = new BlandWebClient( - agentId, - sessionToken - ); - await blandClient.initConversation({ - sampleRate: 44100, - }); +document.addEventListener("DOMContentLoaded", async () => { + document.getElementById("btn").addEventListener("click", async () => { + const blandClient = new BlandWebClient(agentId, sessionToken); + await blandClient.initConversation({ + sampleRate: 44100, }); + }); }); ``` @@ -49,11 +46,12 @@ document.addEventListener('DOMContentLoaded', async () => { - [Try out Agent Testing!](https://app.bland.ai/home?page=testing) - Aim for less than >2,000 characters where possible. - Simple, direct prompts are the most predictable and reliable. - - Frame instructions positively: - - `"Do this"` rather than `"Don't do this"`. + - Frame instructions positively: + - `"Do this"` rather than `"Don't do this"`. - Ex. "Keep the conversation casual" rather than "Don't be too formal". - This gives concrete examples of what to do, instead of leaving expected behavior open to interpretation. + @@ -63,35 +61,37 @@ document.addEventListener('DOMContentLoaded', async () => { Define a JSON schema for how you want to get information about the call - information like email addresses, names, appointment times or any other type of custom data. - In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. +In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. - For example, if you wanted to retrieve this information from the call: +For example, if you wanted to retrieve this information from the call: - ```json - "analysis_schema": { - "email_address": "email", - "first_name": "string", - "last_name": "string", - "wants_to_book_appointment": "boolean", - "appointment_time": "YYYY-MM-DD HH:MM:SS" - } - ``` +```json +"analysis_schema": { + "email_address": "email", + "first_name": "string", + "last_name": "string", + "wants_to_book_appointment": "boolean", + "appointment_time": "YYYY-MM-DD HH:MM:SS" +} +``` - You would get it filled out like this in your webhook once the call completes: +You would get it filled out like this in your webhook once the call completes: + +```json +"analysis": { + "email_address": "johndoe@gmail.com", + "first_name": "John", + "last_name": "Doe", + "wants_to_book_appointment": true, + "appointment_time": "2024-01-01 12:00:00" +} +``` - ```json - "analysis": { - "email_address": "johndoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "wants_to_book_appointment": true, - "appointment_time": "2024-01-01 12:00:00" - } - ``` - Add any additional information you want to associate with the call. This can be useful for tracking or categorizing calls. + Add any additional information you want to associate with the call. This can be useful for tracking or categorizing + calls. @@ -104,80 +104,81 @@ document.addEventListener('DOMContentLoaded', async () => { - Select a supported language of your choice. - Optimizes every part of our API for that language - transcription, speech, and other inner workings. - - Supported Languages and their codes: - - English: ```ENG``` - - Spanish: ```ESP``` - - French: ```FRE``` - - Polish: ```POL``` - - German: ```GER``` - - Italian: ```ITA``` - - Brazilian Portuguese: ```PBR``` - - Portuguese: ```POR``` + Select a supported language of your choice. Optimizes every part of our API for that language - transcription, speech, + and other inner workings. Supported Languages and their codes: - English: ```ENG``` - Spanish: ```ESP``` - French: + ```FRE``` - Polish: ```POL``` - German: ```GER``` - Italian: ```ITA``` - Brazilian Portuguese: ```PBR``` - Portuguese: + ```POR``` Select a model to use for your call. - Options: `base`, `turbo` and `enhanced`. +Options: `base`, `turbo` and `enhanced`. - In nearly all cases, `enhanced` is the best choice for now. +In nearly all cases, `enhanced` is the best choice for now. - There are three different ways to use Bland: +There are three different ways to use Bland: - - `model: base` - - The original, follows scripts/procedures most effectively. - - Supports all features and capabilities. - - Best for Custom Tools - - - `model: enhanced` - - Much faster latency and very conversational, works best with objective-based prompts. - - Supports all features and capabilities. +- `model: base` - - `model: turbo` - - The absolute fastest latency possible, can be verbose at times - - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) - - Extremely realistic conversation capabilities + - The original, follows scripts/procedures most effectively. + - Supports all features and capabilities. + - Best for Custom Tools - - +- `model: enhanced` + + - Much faster latency and very conversational, works best with objective-based prompts. + - Supports all features and capabilities. + +- `model: turbo` + + - The absolute fastest latency possible, can be verbose at times + - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) + - Extremely realistic conversation capabilities + + + + A phrase that your call will start with instead of a generating one on the fly. This works both with and without `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. - To remove, set to `null` or an empty string. +To remove, set to `null` or an empty string. + Interact with the real world through API calls. - Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) +Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) + - Integrate data from external APIs into your agent's knowledge. + Integrate data from external APIs into your agent's knowledge. + +Set to `null` or an empty string to clear dynamic data settings. - Set to `null` or an empty string to clear dynamic data settings. +Detailed usage in the [Send Call](calls.mdx) endpoint. - Detailed usage in the [Send Call](calls.mdx) endpoint. When you increase the interruption latency, you force the AI phone agent to listen longer before responding. In practice, increasing the threshold results in less interruptions and more latency. - Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. +Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. + +Set to `null` to reset to default. - Set to `null` to reset to default. The maximum duration that calls to your agent can last before being automatically terminated. - Set to `null` to reset to default. +Set to `null` to reset to default. + ### Response @@ -195,26 +196,21 @@ document.addEventListener('DOMContentLoaded', async () => { ```json Response { "agent": { - "agent_id": "2c565dc7-f41f-43db-a99f-e4c8ba9d7d18", - "webhook": null, - "dynamic_data": null, - "interruption_threshold": null, - "first_sentence": null, - "model": "enhanced", - "voice_settings": null, - "voice": "maya", - "prompt": "...", - "temperature": null, - "max_duration": 30, - "language": "ENG", - "tools": null + "agent_id": "2c565dc7-f41f-43db-a99f-e4c8ba9d7d18", + "webhook": null, + "dynamic_data": null, + "interruption_threshold": null, + "first_sentence": null, + "model": "enhanced", + "voice_settings": null, + "voice": "maya", + "prompt": "...", + "temperature": null, + "max_duration": 30, + "language": "ENG", + "tools": null } } ``` - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-analyze.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-analyze.mdx index 0766b4d2dd..8e3960204a 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-analyze.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-analyze.mdx @@ -20,7 +20,8 @@ slug: api-v1/post/batches-id-analyze ### Request Body - This is the overall purpose of the batch of calls. Provides context for the analysis to guide how the questions/transcripts are interpreted. + This is the overall purpose of the batch of calls. Provides context for the analysis to guide how the + questions/transcripts are interpreted. @@ -28,17 +29,19 @@ slug: api-v1/post/batches-id-analyze Each question should be an array with two elements: the question text and the expected answer type (e.g., "string", "boolean"). - Fairly flexible in terms of the expected answer type, and unanswerable questions will default to `null`. - - Examples: - ```json - "questions": [ - ["Who answered the call?", "human or voicemail"], - ["Positive feedback about the product: ", "string"], - ["Negative feedback about the product: ", "string"], - ["Customer confirmed they were satisfied", "boolean"] - ] - ``` +Fairly flexible in terms of the expected answer type, and unanswerable questions will default to `null`. + +Examples: + +```json +"questions": [ + ["Who answered the call?", "human or voicemail"], + ["Positive feedback about the product: ", "string"], + ["Negative feedback about the product: ", "string"], + ["Customer confirmed they were satisfied", "boolean"] + ] +``` + ### Response @@ -54,15 +57,17 @@ slug: api-v1/post/batches-id-analyze Contains the analyzed answers for each call in the batch. - The keys are `call_id`s from the batch, and the array values are the analysis results for each question in the batch. +The keys are `call_id`s from the batch, and the array values are the analysis results for each question in the batch. + Token-based price for the analysis request. - As a rough estimate, the base cost is `0.003` credits with an additional `0.0015` credits per call in the batch. +As a rough estimate, the base cost is `0.003` credits with an additional `0.0015` credits per call in the batch. + +Longer call transcripts and higher numbers of questions can increase the cost, however the cost scales very effectively with batches vs. individual calls. - Longer call transcripts and higher numbers of questions can increase the cost, however the cost scales very effectively with batches vs. individual calls. @@ -87,10 +92,3 @@ slug: api-v1/post/batches-id-analyze } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-stop.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-stop.mdx index 341fc4913f..6e6a910544 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-stop.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches-id-stop.mdx @@ -20,7 +20,8 @@ slug: api-v1/post/batches-id-stop ### Response - The status of the request. If anything other than 'success', an error has occurred or all calls have already been completed. + The status of the request. If anything other than 'success', an error has occurred or all calls have already been + completed. @@ -47,12 +48,3 @@ slug: api-v1/post/batches-id-stop ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches.mdx index 17ee646b5c..25311afd0d 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/batches.mdx @@ -16,19 +16,22 @@ slug: api-v1/post/batches This is the prompt or task used for all the phone calls in the request. Information can be inserted into it surrounding variable names with \{\{curly braces\}\}. - Example: - ```json - "You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}." - ``` +Example: + +```json +"You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}." +``` + Define a list of calls to make and their properties. Each call in call_data MUST have a "phone_number" property. Properties are case-sensitive. - Example: +Example: + ```json [ - { + { "phone_number": "1234567890", "business": "ABC Corp", "service": "Netflix", @@ -42,24 +45,29 @@ slug: api-v1/post/batches } ] ``` + - Adds a user-friendly label to your batch to keep track of it's original intention. This can help differentiate multiple call batches that are part of the same Campaign. Shown when a batch is retreived. + Adds a user-friendly label to your batch to keep track of it's original intention. This can help differentiate + multiple call batches that are part of the same Campaign. Shown when a batch is retreived. - Use ```campaign_id``` to organize related batches together. This can be set manually or auto-generated through Campaigns. + Use ```campaign_id``` to organize related batches together. This can be set manually or auto-generated through + Campaigns. When this is set to ```true```, only the first call of ```call_data``` will be dispatched. A common use case is to set the first ```phone_number``` value to your own to confirm everything's set up properly. - Includes additional information in the response when true so that it's easier to find any issues. +Includes additional information in the response when true so that it's easier to find any issues. + - All other parameters supported by the [Send Call](calls.mdx) endpoint are supported here as well. They will be applied to each call in the batch. + All other parameters supported by the [Send Call](calls.mdx) endpoint are supported here as well. They will + be applied to each call in the batch. ### Response @@ -76,18 +84,9 @@ slug: api-v1/post/batches ```json Response { - "message": "success", - "batch_id": "3p$7rQ3p9sT5bzmF-gen-batch" + "message": "success", + "batch_id": "3p$7rQ3p9sT5bzmF-gen-batch" } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-analyze.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-analyze.mdx index 4e17524f16..4ec5196a78 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-analyze.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-analyze.mdx @@ -20,7 +20,8 @@ slug: api-v1/post/calls-id-analyze ### Request Body - This is the overall purpose of the call. Provides context for the analysis to guide how the questions/transcripts are interpreted. + This is the overall purpose of the call. Provides context for the analysis to guide how the questions/transcripts are + interpreted. @@ -28,17 +29,19 @@ slug: api-v1/post/calls-id-analyze Each question should be an array with two elements: the question text and the expected answer type (e.g., "string", "boolean"). - Fairly flexible in terms of the expected answer type, and unanswerable questions will default to `null`. +Fairly flexible in terms of the expected answer type, and unanswerable questions will default to `null`. + +Examples: + +```json +"questions": [ + ["Who answered the call?", "human or voicemail"], + ["Positive feedback about the product: ", "string"], + ["Negative feedback about the product: ", "string"], + ["Customer confirmed they were satisfied", "boolean"] + ] +``` - Examples: - ```json - "questions": [ - ["Who answered the call?", "human or voicemail"], - ["Positive feedback about the product: ", "string"], - ["Negative feedback about the product: ", "string"], - ["Customer confirmed they were satisfied", "boolean"] - ] - ``` ### Response @@ -58,9 +61,10 @@ slug: api-v1/post/calls-id-analyze Token-based price for the analysis request. - As a rough estimate, the base cost is `0.003` credits with an additional `0.0015` credits per call in the call. +As a rough estimate, the base cost is `0.003` credits with an additional `0.0015` credits per call in the call. + +Longer call transcripts and higher numbers of questions can increase the cost, however the cost scales very effectively with calls vs. individual calls. - Longer call transcripts and higher numbers of questions can increase the cost, however the cost scales very effectively with calls vs. individual calls. @@ -77,10 +81,3 @@ slug: api-v1/post/calls-id-analyze } ``` - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-stop.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-stop.mdx index 0c971604df..ab21194bc9 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-stop.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-id-stop.mdx @@ -24,9 +24,8 @@ slug: api-v1/post/calls-id-stop - If the status is `success`, the message will say "Call ended successfully." - Otherwise, if the status is `error`, the message will say "SID not found for - the given c_id." or "Internal server error." + If the status is `success`, the message will say "Call ended successfully." Otherwise, if the status is `error`, the + message will say "SID not found for the given c_id." or "Internal server error." @@ -37,12 +36,3 @@ slug: api-v1/post/calls-id-stop } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple-pathway.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple-pathway.mdx index 6f3929faca..0776b81439 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple-pathway.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple-pathway.mdx @@ -33,18 +33,19 @@ slug: api-v1/post/calls-simple-pathway - "+1 222 333 4444" - "222-333-4444" - Invalid: + Invalid: - "12223334444" - "552223334444" - "non-numeric characters" - "2223334444 ext. 123" + Follows the conversational pathway you created to guide the conversation. - You can access your pathway_id by clicking on the 'Copy ID' button on your pathways [here](https://app.bland.ai/home?page=convo-pathways). If you don't have any pathways, click the 'Create Pathway' button to create one! +You can access your pathway_id by clicking on the 'Copy ID' button on your pathways [here](https://app.bland.ai/home?page=convo-pathways). If you don't have any pathways, click the 'Create Pathway' button to create one! @@ -53,9 +54,8 @@ slug: api-v1/post/calls-simple-pathway [Step by step Web Tutorial](https://docs.bland.ai/tutorials/pathways) - - + ### Response @@ -77,12 +77,3 @@ slug: api-v1/post/calls-simple-pathway ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple.mdx index 0026248334..9d4ae9888d 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls-simple.mdx @@ -29,12 +29,13 @@ slug: api-v1/post/calls-simple - "+1 222 333 4444" - "222-333-4444" - Invalid: + Invalid: - "12223334444" - "552223334444" - "non-numeric characters" - "2223334444 ext. 123" + @@ -52,14 +53,13 @@ slug: api-v1/post/calls-simple - [Try out Agent Testing!](https://app.bland.ai/home?page=testing) - Aim for less than >2,000 characters where possible. - Simple, direct prompts are the most predictable and reliable. - - Frame instructions positively: - - `"Do this"` rather than `"Don't do this"`. + - Frame instructions positively: + - `"Do this"` rather than `"Don't do this"`. - Ex. "Keep the conversation casual" rather than "Don't be too formal". - This gives concrete examples of what to do, instead of leaving expected behavior open to interpretation. - - + ### Response @@ -81,12 +81,3 @@ slug: api-v1/post/calls-simple ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls.mdx index 9d305fe57b..6094902362 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/calls.mdx @@ -34,12 +34,13 @@ slug: api-v1/post/calls - "+1 222 333 4444" - "222-333-4444" - Invalid: + Invalid: - "12223334444" - "552223334444" - "non-numeric characters" - "2223334444 ext. 123" + @@ -57,30 +58,32 @@ slug: api-v1/post/calls - [Try out Agent Testing!](https://app.bland.ai/home?page=testing) - Aim for less than >2,000 characters where possible. - Simple, direct prompts are the most predictable and reliable. - - Frame instructions positively: - - `"Do this"` rather than `"Don't do this"`. + - Frame instructions positively: + - `"Do this"` rather than `"Don't do this"`. - Ex. "Keep the conversation casual" rather than "Don't be too formal". - This gives concrete examples of what to do, instead of leaving expected behavior open to interpretation. + The voice of the AI agent to use. Accepts any form of voice ID, including custom voice clones and voice presets. - Default voices can be referenced directly by their name instead of an id. +Default voices can be referenced directly by their name instead of an id. + +Usage example: `voice: "maya"` - Usage example: `voice: "maya"` +Bland Curated voices: - Bland Curated voices: - - `maya` - - `mason` - - `ryan` - - `adriana` - - `tina` - - `matt` - - `evelyn` +- `maya` +- `mason` +- `ryan` +- `adriana` +- `tina` +- `matt` +- `evelyn` - Use the [GET /v1/voices](https://api.bland.ai/voices) endpoint to see a full list of your available voices. +Use the [GET /v1/voices](https://api.bland.ai/voices) endpoint to see a full list of your available voices. @@ -97,48 +100,51 @@ slug: api-v1/post/calls - `reduce_latency: false, voice_id: 3` is equivalent to `voice: "HQ3"` Including `reduce_latency` may override the `voice` parameter, so exclude it when using `voice`. + All presets have been migrated to the `voice` parameter and can use either the preset name or ID. If you used to have a `voice_preset_id` of `"2f9fdbc7-4bf2-4792-8a18-21ce3c93978f"`, you can now use `voice: "2f9fdbc7-4bf2-4792-8a18-21ce3c93978f"`. + Define a JSON schema for how you want to get information about the call - information like email addresses, names, appointment times or any other type of custom data. - In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. - - For example, if you wanted to retrieve this information from the call: - - ```json - "analysis_schema": { - "email_address": "email", - "first_name": "string", - "last_name": "string", - "wants_to_book_appointment": "boolean", - "appointment_time": "YYYY-MM-DD HH:MM:SS" - } - ``` - - You would get it filled out like this in your webhook once the call completes: - - ```json - "analysis": { - "email_address": "johndoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "wants_to_book_appointment": true, - "appointment_time": "2024-01-01 12:00:00" - } - ``` - +In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. + +For example, if you wanted to retrieve this information from the call: + +```json +"analysis_schema": { + "email_address": "email", + "first_name": "string", + "last_name": "string", + "wants_to_book_appointment": "boolean", + "appointment_time": "YYYY-MM-DD HH:MM:SS" +} +``` +You would get it filled out like this in your webhook once the call completes: + +```json +"analysis": { + "email_address": "johndoe@gmail.com", + "first_name": "John", + "last_name": "Doe", + "wants_to_book_appointment": true, + "appointment_time": "2024-01-01 12:00:00" +} +``` + + - A phrase that your call will start with instead of a generating one on the fly. This works both with and without `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. + A phrase that your call will start with instead of a generating one on the fly. This works both with and without + `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. @@ -154,7 +160,8 @@ slug: api-v1/post/calls When you increase the interruption latency, you force the AI phone agent to listen longer before responding. In practice, increasing the threshold results in less interruptions and more latency. - Try setting the threshold to `200` milliseconds. You'll encounter higher latency, but you'll be interrupted much less frequently. +Try setting the threshold to `200` milliseconds. You'll encounter higher latency, but you'll be interrupted much less frequently. + @@ -162,84 +169,94 @@ slug: api-v1/post/calls can access the ID of your pathways by clicking the 'Copy ID' button of your pathway [here](https://app.bland.ai/home?page=convo-pathways) - Note: Certain parameters do not apply when using pathways. +Note: Certain parameters do not apply when using pathways. - - - `task` - The pathway substitutes as the agent's instructions. - - `model` - We use our own fine-tuned models under the hood. - - `tools` - Replaced by 'Webhook' Node in Pathways - - `transfer_list` - Replaced by 'Transfer Call' Node in Pathways - - `transfer_phone_number` - Replaced by 'Transfer Call' Node in Pathways - +{" "} + + + - `task` - The pathway substitutes as the agent's instructions. - `model` - We use our own fine-tuned models under the + hood. - `tools` - Replaced by 'Webhook' Node in Pathways - `transfer_list` - Replaced by 'Transfer Call' Node in + Pathways - `transfer_phone_number` - Replaced by 'Transfer Call' Node in Pathways + + +Example Simple Request body: + +```json +"phone_number": "+1975934749", +"pathway_id": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7" +``` - Example Simple Request body: - ```json - "phone_number": "+1975934749", - "pathway_id": "a0f0d4ed-f5f5-4f16-b3f9-22166594d7a7" - ``` Select a model to use for your call. - Options: `gpt4`, `base`, `turbo` and `enhanced`. +Options: `gpt4`, `base`, `turbo` and `enhanced`. - In nearly all cases, `enhanced` is the best choice for now. +In nearly all cases, `enhanced` is the best choice for now. - There are four different ways to use Bland: +There are four different ways to use Bland: - - `model: gpt4` - - Slow but accurate - - Supports all features and capabilities. - - Best for complex tasks where latency isn't a priority +- `model: gpt4` - - `model: base` - - The original, follows scripts/procedures most effectively. - - Supports all features and capabilities. - - Best for Custom Tools - - - `model: enhanced` - - Much faster latency and very conversational, works best with objective-based prompts. - - Supports all features and capabilities. + - Slow but accurate + - Supports all features and capabilities. + - Best for complex tasks where latency isn't a priority - - `model: turbo` - - The absolute fastest latency possible, can be verbose at times - - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) - - Extremely realistic conversation capabilities +- `model: base` - - + - The original, follows scripts/procedures most effectively. + - Supports all features and capabilities. + - Best for Custom Tools + +- `model: enhanced` + + - Much faster latency and very conversational, works best with objective-based prompts. + - Supports all features and capabilities. + +- `model: turbo` + + - The absolute fastest latency possible, can be verbose at times + - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) + - Extremely realistic conversation capabilities + + + + Interact with the real world through API calls. - Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) +Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) + Add any additional information you want to associate with the call. This can be useful for tracking or categorizing calls. - Anything that you put here will be returned in your webhook or in the call details under `metadata`. +Anything that you put here will be returned in your webhook or in the call details under `metadata`. + +Example: + +```json +"metadata": { + "campaign_id": "1234", + "source": "web" +} +``` - Example: - ```json - "metadata": { - "campaign_id": "1234", - "source": "web" - } - ``` - The webhook should be a http / https callback url. We will send the call_id - and transcript to this URL after the call completes. This can be useful if you - want to have real time notifications when calls finish. + The webhook should be a http / https callback url. We will send the call_id and transcript to this URL after the call + completes. This can be useful if you want to have real time notifications when calls finish. - To record your phone call, set `record` to true. When your call completes, you can access through the `recording_url` field in the call details or your webhook. + To record your phone call, set `record` to true. When your call completes, you can access through the `recording_url` + field in the call details or your webhook. @@ -251,68 +268,64 @@ slug: api-v1/post/calls - In the `task`, refer to the action solely as "transfer" or "transferring". - Alternate phrasing such as "swap" or "switch" can mislead the agent, causing the action to be ignored. + Give your agent the ability to transfer calls to a set of phone numbers. - Overrides `transfer_phone_number` if a `transfer_list.default` is specified. +Overrides `transfer_phone_number` if a `transfer_list.default` is specified. - Will default to `transfer_list.default`, or the chosen phone number. +Will default to `transfer_list.default`, or the chosen phone number. - Example usage to route calls to different departments: +Example usage to route calls to different departments: + +```json +"transfer_list": { + "default": "+12223334444", + "sales": "+12223334444", + "support": "+12223334444", + "billing": "+12223334444" +} +``` - ```json - "transfer_list": { - "default": "+12223334444", - "sales": "+12223334444", - "support": "+12223334444", - "billing": "+12223334444" - } - ``` - Select a supported language of your choice. - Optimizes every part of our API for that language - transcription, speech, and other inner workings. - - Supported Languages and their codes: - - English: ```ENG``` - - Spanish: ```ESP``` - - French: ```FRE``` - - Polish: ```POL``` - - German: ```GER``` - - Italian: ```ITA``` - - Brazilian Portuguese: ```PBR``` - - Portuguese: ```POR``` + Select a supported language of your choice. Optimizes every part of our API for that language - transcription, speech, + and other inner workings. Supported Languages and their codes: - English: ```ENG``` - Spanish: ```ESP``` - French: + ```FRE``` - Polish: ```POL``` - German: ```GER``` - Italian: ```ITA``` - Brazilian Portuguese: ```PBR``` - Portuguese: + ```POR``` - Set the longest you want the call to possibly go in minutes. After the max_duration minutes have passed, the call will automatically end. - - Example Values: ```20, 2``` + Set the longest you want the call to possibly go in minutes. After the max_duration minutes have passed, the call will + automatically end. Example Values: ```20, 2``` Enables machine detection when the call starts to determine whether the call was answered by a person or a voicemail. - Best Practices (when enabled): - - Since the determination is made at the beginning of the call, use `wait_for_greeting` to try and coax a human response. - - If combined with `first_sentence`, try wording it so the person answering says something back - ex. `"Hello?"` or `"Is this \{\{name\}\}?"`. +Best Practices (when enabled): + +- Since the determination is made at the beginning of the call, use `wait_for_greeting` to try and coax a human response. +- If combined with `first_sentence`, try wording it so the person answering says something back - ex. `"Hello?"` or `"Is this \{\{name\}\}?"`. + +Price: `$0.02` per call, however there is no charge for unanswered calls or calls that failed to send. - Price: `$0.02` per call, however there is no charge for unanswered calls or calls that failed to send. Specify a purchased Outbound Number to call from. Country code is required, spaces or parentheses must be excluded. - By default, calls are initiated from a separate pool of numbers owned by Bland. +By default, calls are initiated from a separate pool of numbers owned by Bland. + - The pronunciation guide is an `array` of `objects` that guides the LLM on how to say specific words. This is great for situations with complicated terms or names. + The pronunciation guide is an `array` of `objects` that guides the LLM on how to say specific words. This is great for situations with complicated terms or names. -```json +````json [ { "word": "example", @@ -329,7 +342,7 @@ slug: api-v1/post/calls ] ``` - + - `word` — the word you want to guide the LLM on how to pronounce @@ -337,21 +350,21 @@ slug: api-v1/post/calls — the word you want to guide the LLM on how to pronounce. - `case_sensitive` — whether or not to consider case. Particularly useful with names. EG: 'Max' the name versus 'max' the word. Defaults to false. `Not required`. - - `spaced` + - `spaced` — whether or not to consider spaces. When `true` the word 'high' would be flagged but NOT 'hightop'. Defaults to true. `Not required`. - + A value between 0 and 1 that controls the randomness of the LLM. 0 will cause more deterministic outputs while 1 will cause more random. - + Example Values: ```"0.9", "0.3", "0.5"``` The time you want the call to start. If you don't specify a time (or the time is in the past), the call will send immediately. - + Set your time in the format `YYYY-MM-DD HH:MM:SS -HH:MM` (ex. `2021-01-01 12:00:00 -05:00`). The timezone is optional, and defaults to UTC if not specified. @@ -370,7 +383,7 @@ slug: api-v1/post/calls Options: - ```hangup``` - - ```leave_message ``` + - ```leave_message ``` - ```ignore``` Examples: @@ -388,12 +401,12 @@ slug: api-v1/post/calls - AMD mode helps your AI navigate phone trees and IVR systems. If you know your call will hit an automated system you should switch it on. + AMD mode helps your AI navigate phone trees and IVR systems. If you know your call will hit an automated system you should switch it on. Behavioral changes: - Much higher `interruption_threshold` so that the options are listened to in full. - Underlying prompt is adjusted so the AI is aware it's navigating a phone tree. - + NOTE: AMD mode causes increased delay for the first response, even if answered by a human. Highly recommended to set to `false` in the majority of cases. @@ -404,7 +417,7 @@ slug: api-v1/post/calls The AI agent will be aware of both the key names as well as their corresponding values. - Example Issue: + Example Issue: - The LLM is hallucinating specific facts. You need to provide specific information. Example Solution: - Use `request_data` to specify and label that data. @@ -437,16 +450,16 @@ slug: api-v1/post/calls `headers`: An object of headers to send with the request. - `body`: The body of the request. - - The following variables can be injected into the dynamic request body: - + `body`: The body of the request. + + The following variables can be injected into the dynamic request body: + - `{{from}}` (Ex. `+12223334444`) - `{{to}}` - `{{short_from}}` (Ex. `2223334444`) - `{{short_to}}` - `{{call_id}}` - + These string values will be replaced in each `dynamic_data[].body` where they're used by system values in each request. Try out with this example: @@ -468,23 +481,23 @@ slug: api-v1/post/calls ] } ] -``` +```` + An array of objects describing how to parse and use the data fetched from the API. Each object in this array should contain: - - `name`: A label for the fetched data. + - `name`: A label for the fetched data. - Example: `"Flight Status"` - - `data`: The JSON path in the API response to extract the data from. + - `data`: The JSON path in the API response to extract the data from. - Example: `"user.flights[0].status"` - - `context`: How this data should be incorporated into the AI's knowledge. + - `context`: How this data should be incorporated into the AI's knowledge. - Example: `"John's flight is currently {{Flight Status}}"` + - - ### Response @@ -506,19 +519,21 @@ slug: api-v1/post/calls For validation errors, a detailed list of each field with an error and it's error message. - Example: - ```json +Example: + +```json { - "status": "error", - "message": "Invalid parameters", - "errors": [ - "Missing required parameter: phone_number.", - "Missing required parameter: task.", - "Phone number must be a string or number.", - "Task must be a string." - ] + "status": "error", + "message": "Invalid parameters", + "errors": [ + "Missing required parameter: phone_number.", + "Missing required parameter: task.", + "Phone number must be a string or number.", + "Task must be a string." + ] } - ``` +``` + @@ -533,12 +548,3 @@ slug: api-v1/post/calls ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-insert.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-insert.mdx index d110e84692..e4966bd232 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-insert.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-insert.mdx @@ -25,6 +25,7 @@ slug: api-v1/post/inbound-insert Include the leading `'+'`, country code and the phone number without any special characters. Example: `["+12223334444", "+13334445555"]` + ### Response @@ -40,7 +41,8 @@ slug: api-v1/post/inbound-insert An array of phone numbers that were successfully inserted. - Any phone numbers that failed to be inserted will not be included in this array - for example if they are already in your account or not associated with the sepcified Twilio account. +Any phone numbers that failed to be inserted will not be included in this array - for example if they are already in your account or not associated with the sepcified Twilio account. + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-number-update.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-number-update.mdx index 63bac48bab..7cdd908e98 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-number-update.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-number-update.mdx @@ -12,7 +12,8 @@ slug: api-v1/post/inbound-number-update - The `encrypted_key` for the Twilio account that owns the phone number you want to modify. Not required if you are using a Bland phone number. + The `encrypted_key` for the Twilio account that owns the phone number you want to modify. Not required if you are + using a Bland phone number. ### Path Parameters @@ -28,12 +29,13 @@ slug: api-v1/post/inbound-number-update - `%2B13334445555` - `13334445555` - `3334445555` + ### Body - Provide instructions, relevant information, and examples of the ideal conversation flow. + Provide instructions, relevant information, and examples of the ideal conversation flow. For inbound numbers, consider including additional context about the purpose of the call, and what types of callers to expect. @@ -48,11 +50,12 @@ slug: api-v1/post/inbound-number-update - [Try out Agent Testing!](https://app.bland.ai/home?page=testing) - Aim for less than >2,000 characters where possible. - Simple, direct prompts are the most predictable and reliable. - - Frame instructions positively: - - `"Do this"` rather than `"Don't do this"`. + - Frame instructions positively: + - `"Do this"` rather than `"Don't do this"`. - Ex. "Keep the conversation casual" rather than "Don't be too formal". - This gives concrete examples of what to do, instead of leaving expected behavior open to interpretation. + @@ -62,35 +65,37 @@ slug: api-v1/post/inbound-number-update Define a JSON schema for how you want to get information about the call - information like email addresses, names, appointment times or any other type of custom data. - In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. +In the webhook response or whenever you retrieve call data later, you'll get the data you defined back under `analysis`. - For example, if you wanted to retrieve this information from the call: +For example, if you wanted to retrieve this information from the call: - ```json - "analysis_schema": { - "email_address": "email", - "first_name": "string", - "last_name": "string", - "wants_to_book_appointment": "boolean", - "appointment_time": "YYYY-MM-DD HH:MM:SS" - } - ``` +```json +"analysis_schema": { + "email_address": "email", + "first_name": "string", + "last_name": "string", + "wants_to_book_appointment": "boolean", + "appointment_time": "YYYY-MM-DD HH:MM:SS" +} +``` - You would get it filled out like this in your webhook once the call completes: +You would get it filled out like this in your webhook once the call completes: + +```json +"analysis": { + "email_address": "johndoe@gmail.com", + "first_name": "John", + "last_name": "Doe", + "wants_to_book_appointment": true, + "appointment_time": "2024-01-01 12:00:00" +} +``` - ```json - "analysis": { - "email_address": "johndoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "wants_to_book_appointment": true, - "appointment_time": "2024-01-01 12:00:00" - } - ``` - Add any additional information you want to associate with the call. This can be useful for tracking or categorizing calls. + Add any additional information you want to associate with the call. This can be useful for tracking or categorizing + calls. @@ -103,18 +108,10 @@ slug: api-v1/post/inbound-number-update - Select a supported language of your choice. - Optimizes every part of our API for that language - transcription, speech, and other inner workings. - - Supported Languages and their codes: - - English: ```ENG``` - - Spanish: ```ESP``` - - French: ```FRE``` - - Polish: ```POL``` - - German: ```GER``` - - Italian: ```ITA``` - - Brazilian Portuguese: ```PBR``` - - Portuguese: ```POR``` + Select a supported language of your choice. Optimizes every part of our API for that language - transcription, speech, + and other inner workings. Supported Languages and their codes: - English: ```ENG``` - Spanish: ```ESP``` - French: + ```FRE``` - Polish: ```POL``` - German: ```GER``` - Italian: ```ITA``` - Brazilian Portuguese: ```PBR``` - Portuguese: + ```POR``` @@ -122,60 +119,66 @@ slug: api-v1/post/inbound-number-update and transcript to this URL after the call completes. This can be useful if you want to have real time notifications when calls finish. - Set to `null` or an empty string to clear the webhook. +Set to `null` or an empty string to clear the webhook. + Give your agent the ability to transfer calls to a set of phone numbers. - Overrides `transfer_phone_number` if a `transfer_list.default` is specified. +Overrides `transfer_phone_number` if a `transfer_list.default` is specified. - Will default to `transfer_list.default`, or the chosen phone number. +Will default to `transfer_list.default`, or the chosen phone number. - Example usage to route calls to different departments: +Example usage to route calls to different departments: + +```json +"transfer_list": { + "default": "+12223334444", + "sales": "+12223334444", + "support": "+12223334444", + "billing": "+12223334444" +} +``` - ```json - "transfer_list": { - "default": "+12223334444", - "sales": "+12223334444", - "support": "+12223334444", - "billing": "+12223334444" - } - ``` Select a model to use for your call. - Options: `base`, `turbo` and `enhanced`. +Options: `base`, `turbo` and `enhanced`. - In nearly all cases, `enhanced` is the best choice for now. +In nearly all cases, `enhanced` is the best choice for now. - There are three different ways to use Bland: +There are three different ways to use Bland: - - `model: base` - - The original, follows scripts/procedures most effectively. - - Supports all features and capabilities. - - Best for Custom Tools - - - `model: enhanced` - - Much faster latency and very conversational, works best with objective-based prompts. - - Supports all features and capabilities. +- `model: base` - - `model: turbo` - - The absolute fastest latency possible, can be verbose at times - - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) - - Extremely realistic conversation capabilities + - The original, follows scripts/procedures most effectively. + - Supports all features and capabilities. + - Best for Custom Tools - - +- `model: enhanced` + + - Much faster latency and very conversational, works best with objective-based prompts. + - Supports all features and capabilities. + +- `model: turbo` + + - The absolute fastest latency possible, can be verbose at times + - Limited capabilities currently (excludes Transferring, IVR navigation, Custom Tools) + - Extremely realistic conversation capabilities + + + + A phone number that the agent can transfer to under specific conditions - such as being asked to speak to a human or supervisor. - Set to `null` to remove. +Set to `null` to remove. For best results: @@ -183,44 +186,51 @@ slug: api-v1/post/inbound-number-update - In the `task`, refer to the action solely as "transfer" or "transferring". - Alternate phrasing such as "swap" or "switch" can mislead the agent, causing the action to be ignored. + - To record your phone call, set `record` to true. When your call completes, you can access through the `recording_url` field in the call details or your webhook. + To record your phone call, set `record` to true. When your call completes, you can access through the `recording_url` + field in the call details or your webhook. A phrase that your call will start with instead of a generating one on the fly. This works both with and without `wait_for_greeting`. Can be more than one sentence, but must be less than 200 characters. - To remove, set to `null` or an empty string. +To remove, set to `null` or an empty string. + Interact with the real world through API calls. - Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) +Detailed tutorial here: [Custom Tools](../../tutorials/custom-tools.mdx) + - Integrate data from external APIs into your agent's knowledge. + Integrate data from external APIs into your agent's knowledge. - Set to `null` or an empty string to clear dynamic data settings. +Set to `null` or an empty string to clear dynamic data settings. + +Detailed usage in the [Send Call](calls.mdx) endpoint. - Detailed usage in the [Send Call](calls.mdx) endpoint. When you increase the interruption latency, you force the AI phone agent to listen longer before responding. In practice, increasing the threshold results in less interruptions and more latency. - Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. +Try setting the threshold to `500` milliseconds. You'll encounter higher latency, but you'll be interrupted less frequently. + +Set to `null` to reset to default. - Set to `null` to reset to default. The maximum duration that calls to your agent can last before being automatically terminated. - Set to `null` to reset to default. +Set to `null` to reset to default. + ### Response @@ -238,35 +248,27 @@ slug: api-v1/post/inbound-number-update - If the update was unsuccessful, this will contain the settings that failed to update. Useful to determine how your request is being interpreted on our end. + If the update was unsuccessful, this will contain the settings that failed to update. Useful to determine how your + request is being interpreted on our end. ```json Response { - "status": "success", - "message": "Successfully updated number +18584139939.", - "updates": { - "prompt": "(Your prompt)", - "voice": "maya", - "webhook": null, - "first_sentence": "Roberta speaking, how can I help you?", - "record": false, - "max_duration": 30, - "model": "enhanced", - //... - } + "status": "success", + "message": "Successfully updated number +18584139939.", + "updates": { + "prompt": "(Your prompt)", + "voice": "maya", + "webhook": null, + "first_sentence": "Roberta speaking, how can I help you?", + "record": false, + "max_duration": 30, + "model": "enhanced" + //... + } } ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-purchase.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-purchase.mdx index 66c0318e35..af050d6c07 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-purchase.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/inbound-purchase.mdx @@ -16,30 +16,32 @@ slug: api-v1/post/inbound-purchase ### Body - Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact match if available. + Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact + match if available. - This defines how the AI will start the conversation, information available to - it, and its behaviors. Matches how the outbound `task` parameter functions. + This defines how the AI will start the conversation, information available to it, and its behaviors. Matches how the + outbound `task` parameter functions. Choose a country code for your phone number. - Options: `"US"` or `"CA"` for Canada. For others, please contact support. +Options: `"US"` or `"CA"` for Canada. For others, please contact support. + - The webhook should be a http / https callback url. We will send the call_id - and transcript to this URL after the call completes. This can be useful if you - want to have real time notifications when calls finish. + The webhook should be a http / https callback url. We will send the call_id and transcript to this URL after the call + completes. This can be useful if you want to have real time notifications when calls finish. Specify an exact phone number you'd like to use. If provided, will override the `area_code` parameter and does not fall back to any other number. - Example of the correct format (Note the `"+1"` is mandatory): `"+12223334444"` +Example of the correct format (Note the `"+1"` is mandatory): `"+12223334444"` + ### Response @@ -47,7 +49,8 @@ slug: api-v1/post/inbound-purchase The created phone number, will be in the following format: `+1XXXXXXXXXX` - Example: `+18582814611` +Example: `+18582814611` + @@ -59,12 +62,3 @@ slug: api-v1/post/inbound-purchase ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/outbound-purchase.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/outbound-purchase.mdx index b762beeca3..2df4623fe2 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/outbound-purchase.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/outbound-purchase.mdx @@ -16,7 +16,8 @@ slug: api-v1/post/outbound-purchase ### Body - Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact match if available. + Choose a three-digit area code for your phone number. If set as a parameter, a number will only be purchased by exact + match if available. ### Response @@ -24,7 +25,8 @@ slug: api-v1/post/outbound-purchase The created phone number, will be in the following format: `+1XXXXXXXXXX` - Example: `+18582814611` +Example: `+18582814611` + @@ -36,12 +38,3 @@ slug: api-v1/post/outbound-purchase ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-analyze.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-analyze.mdx index f50a45f221..4cb5d651e7 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-analyze.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-analyze.mdx @@ -12,43 +12,41 @@ slug: api-v1/post/sms-analyze ### Body - -An overarching goal for the information you want to extract from the SMS messages. + An overarching goal for the information you want to extract from the SMS messages. An array of questions that you want the AI to answer, along with their return types. For example: + ```json { - "answers": [ - [ "When does Bob want to move?", "time" ], - [ "Summarize the call.", "summary" ] - ] + "answers": [ + ["When does Bob want to move?", "time"], + ["Summarize the call.", "summary"] + ] } ``` + -The phone number that received the messages. + The phone number that received the messages. -The human/other phone number in the conversation. + The human/other phone number in the conversation. ```json Response { - "status": "success", - "message": "Successfully analyzed SMS messages.", - "answers": [ - "Bob prefers to have movers come in the morning.", - "..." - ] + "status": "success", + "message": "Successfully analyzed SMS messages.", + "answers": ["Bob prefers to have movers come in the morning.", "..."] } ``` diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-check-registration.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-check-registration.mdx index 99b9d43e31..d4f6dd4415 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-check-registration.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-check-registration.mdx @@ -14,10 +14,9 @@ slug: api-v1/post/sms-check-registration ### Body -The `registration_id` for the a2p registration. + The `registration_id` for the a2p registration. - ```json Response @@ -28,4 +27,4 @@ The `registration_id` for the a2p registration. } ``` - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-get-messages.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-get-messages.mdx index 05baf00313..8dee1eb64e 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-get-messages.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-get-messages.mdx @@ -17,11 +17,10 @@ slug: api-v1/post/sms-get-messages The `to` number in the conversation. This is the number you *do not* own. -The `from` number in the conversation. This is the number you *do* own. +The `from` number in the conversation. This is the number you *do* own. **Please note any ordering of numbers will work** - @@ -33,12 +32,3 @@ The `from` number in the conversation. This is the number you *do* own. ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-prompt-update.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-prompt-update.mdx index 373e699fc5..7713c49996 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-prompt-update.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-prompt-update.mdx @@ -12,17 +12,16 @@ slug: api-v1/post/sms-prompt-update ### Body - -The phone number to update. + The phone number to update. -The prompt for the AI to use when replying. + The prompt for the AI to use when replying. -Pass in an array of strings, that if present, the AI should not respond to. Set to `null` to disable. + Pass in an array of strings, that if present, the AI should not respond to. Set to `null` to disable. @@ -34,12 +33,3 @@ Pass in an array of strings, that if present, the AI should not respond to. Set ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-submit-reg.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-submit-reg.mdx index c4c3db0116..3584d37299 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-submit-reg.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-submit-reg.mdx @@ -12,7 +12,7 @@ slug: api-v1/post/sms-submit-reg This documentation provides detailed information on how to register an Application-to-Person (A2P) brand by making a POST request to our API. The process involves submitting your brand's details for registration and verification purposes. -A2P Registration is required for *all* businesses who wish to send SMS. There can be signifcant fines for any non compliant messages. A2P Registration can take 2 days -> 2 Weeks. +A2P Registration is required for _all_ businesses who wish to send SMS. There can be signifcant fines for any non compliant messages. A2P Registration can take 2 days -> 2 Weeks. ## Endpoint @@ -42,10 +42,11 @@ Your request should include a JSON body with the following parameters: - `trusted_user` (object): An object containing details about the trusted user registering the brand. Includes `position`, `last_name`, `phone_number`, `first_name`, and `email`. Ex. of trusted_user obj: -```json + +```json { "position": "CEO" //must be C Suite or VP, - "last_name":"Smith", + "last_name":"Smith", "first_name":"John" } ``` @@ -61,12 +62,11 @@ Our API provides detailed error messages to help you understand what went wrong A successful request returns a `200 OK` status code with a JSON body containing a message indicating the registration was successful and any relevant data or identifiers related to the A2P brand registration. -***Important**** The Brand Registration can take several attempts and days to weeks to complete. This success only indicates we *submitted* the registration correctly. - +**\*Important\*\*** The Brand Registration can take several attempts and days to weeks to complete. This success only indicates we _submitted_ the registration correctly. ```json { "message": "A2P Brand registration successful.", "data": {...} } -``` \ No newline at end of file +``` diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-toggle-human.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-toggle-human.mdx index 4e191912b5..a3c86027dd 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-toggle-human.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-toggle-human.mdx @@ -14,14 +14,15 @@ slug: api-v1/post/sms-toggle-human ### Body -The phone number to update. + The phone number to update. -Turn human mode on or off. +Turn human mode on or off. -`true` means that the AI will *not* reply. +`true` means that the AI will _not_ reply. `false` means the AI will reply + @@ -33,12 +34,3 @@ Turn human mode on or off. ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-webhook-update.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-webhook-update.mdx index db1761ad84..3445c3104f 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-webhook-update.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/sms-webhook-update.mdx @@ -13,11 +13,11 @@ slug: api-v1/post/sms-webhook-update ### Body -The phone number to update. + The phone number to update. -The webhook to fire when an SMS is received. + The webhook to fire when an SMS is received. @@ -29,12 +29,3 @@ The webhook to fire when an SMS is received. ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-disable.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-disable.mdx index 514b43af54..67c194236c 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-disable.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-disable.mdx @@ -16,24 +16,25 @@ slug: api-v1/post/subaccounts-id-disable ### Path Parameters - The unique identifier of the subaccount to which you want to transfer credits. + The unique identifier of the subaccount to which you want to transfer credits. ### Response + - Whether the subaccount was successfully disabled. + Whether the subaccount was successfully disabled. - The affected subaccount's unique identifier. + The affected subaccount's unique identifier. - The amount of credits transferred back to the parent account. + The amount of credits transferred back to the parent account. - The new balance of the parent account after the transfer. + The new balance of the parent account after the transfer. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-rotate.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-rotate.mdx index 6b2d0a2af2..3fcacb17d9 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-rotate.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-rotate.mdx @@ -14,20 +14,21 @@ slug: api-v1/post/subaccounts-id-rotate ### Path Parameters - The unique identifier of the subaccount to which you want to transfer credits. + The unique identifier of the subaccount to which you want to transfer credits. ### Response + - Whether the subaccount creation succeeded. + Whether the subaccount creation succeeded. - The affected subaccount's unique identifier. + The affected subaccount's unique identifier. - The new API key for the subaccount. + The new API key for the subaccount. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-transfer.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-transfer.mdx index 29e440bf86..de7574d33c 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-transfer.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts-id-transfer.mdx @@ -14,7 +14,7 @@ slug: api-v1/post/subaccounts-id-transfer ### Path Parameters - The unique identifier of the subaccount to which you want to transfer credits. + The unique identifier of the subaccount to which you want to transfer credits. ### Body @@ -23,19 +23,21 @@ slug: api-v1/post/subaccounts-id-transfer This many of your API credits will be transferred to the subaccount. The balance must be a positive integer that is at least 1, and less than your current account balance. + ### Response + - Whether the subaccount creation succeeded. + Whether the subaccount creation succeeded. - The new balance of your account after the transfer. + The new balance of your account after the transfer. - The new balance of the subaccount after the transfer. + The new balance of the subaccount after the transfer. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts.mdx index a56839b917..fff14f6200 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/subaccounts.mdx @@ -21,14 +21,15 @@ slug: api-v1/post/subaccounts Special per-minute pricing plans carry over automatically to the subaccount, while increased rate limits do not. Unused credits can be reclaimed later with the subaccount's balance if needed. + - The first name of the user who will be using the subaccount. + The first name of the user who will be using the subaccount. - The last name of the user who will be using the subaccount. + The last name of the user who will be using the subaccount. @@ -37,15 +38,17 @@ slug: api-v1/post/subaccounts This enables you to set up credit card information, view and monitor usage, and further manage the subaccount as needed. The subaccount user will not be able to log into the Dev Portal unless you explicitly enable it by adding them as an Authorized User. + ### Response + - Whether the subaccount creation succeeded. + Whether the subaccount creation succeeded. - The unique identifier for the newly created subaccount. + The unique identifier for the newly created subaccount. @@ -54,6 +57,7 @@ slug: api-v1/post/subaccounts This is the only information that the subaccount user will need to start using the API. Do not use this as an identifier for the subaccount, since it can be rotated. + @@ -64,4 +68,4 @@ slug: api-v1/post/subaccounts "subaccount_key": "sub-sk-1234567890" } ``` - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools-tool-id.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools-tool-id.mdx index aeb4bc6419..e068e4af00 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools-tool-id.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools-tool-id.mdx @@ -12,8 +12,9 @@ slug: api-v1/post/tools-tool-id ### Path Parameters + - The ID of the Custom Tool you want to update. + The ID of the Custom Tool you want to update. ### Body @@ -38,8 +39,9 @@ slug: api-v1/post/tools-tool-id - `play` - `dial` - `hang` - + Choosing too similar of names to the default tools could cause the AI to select the wrong one, so decriptive two to three-word names are preferred. + @@ -52,6 +54,7 @@ slug: api-v1/post/tools-tool-id - `Press Buttons`: Presses buttons on phone. Each character is a different button. - `Wait`: Wait and go silent for an extended period of time (only use if absolutely necessary). - `Finish`: Say a goodbye message and end the call once completed. + @@ -64,44 +67,49 @@ slug: api-v1/post/tools-tool-id Special Note: You can have the AI dynamically generate speech by defining `input.speech` in the `input_schema`. + ```json - { - "input_schema": { - "example": { - "speech": "Checking your account details right now John!", - "name": "John Doe", - "email": "johndoe@gmail.com" - }, - "type": "object", - "properties": { - "speech": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["speech", "name", "email"] - } - } +{ + "input_schema": { + "example": { + "speech": "Checking your account details right now John!", + "name": "John Doe", + "email": "johndoe@gmail.com" + }, + "type": "object", + "properties": { + "speech": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["speech", "name", "email"] + } +} ``` + + This is the endpoint of the external API that the tool will call. It must begin with `https://` and be a valid URL. + This is the HTTP method that the tool will use to call the external API. Valid options are `GET` and `POST`. + @@ -114,22 +122,25 @@ slug: api-v1/post/tools-tool-id Since prompt variables are supported, you can use them in the headers to send dynamic information to the external API. + ```json - // At the top level of your send call request you can define variables that you can access later using the double curly braces/dot syntax. +// At the top level of your send call request you can define variables that you can access later using the double curly braces/dot syntax. +{ + "request_data": { + "api_key": "sk-1234567890" + }, + "tools": [ { - "request_data": { - "api_key": "sk-1234567890", - }, - "tools": [ - { - "headers": { - "Authorization": "Bearer {{api_key}}" - } - } - ] + "headers": { + "Authorization": "Bearer {{api_key}}" + } } + ] +} ``` + + @@ -144,6 +155,7 @@ slug: api-v1/post/tools-tool-id Note: `GET` requests do not have a body. + ```json // AI-generated input is created as the `input` Prompt Variable - and the structure is defined by the input schema. // `input` will match the structure of `input_schema.example` if it is defined. @@ -160,7 +172,9 @@ slug: api-v1/post/tools-tool-id } } ``` + + @@ -173,16 +187,19 @@ slug: api-v1/post/tools-tool-id This is generally used with GET requests and built-in Prompt Variables like `"{{phone_number}}"` or `"{{call_id}}"`. + ```json - // appends ?pn={{phone_number}}&callId={{call_id}} to the URL - { - "query": { - "pn": "{{phone_number}}", - "callId": "{{call_id}}" - } - } +// appends ?pn={{phone_number}}&callId={{call_id}} to the URL +{ + "query": { + "pn": "{{phone_number}}", + "callId": "{{call_id}}" + } +} ``` + + @@ -209,34 +226,37 @@ slug: api-v1/post/tools-tool-id Agent input can be nested, and the will be transformed into JSON even if it's initially a string. + ```json - { - "input_schema": { - "example": { - "name": "John Doe", - "email": "johndoe@gmail.com" - }, - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["name", "email"] - }, - // both of these methods are identical, since {{input}} will be transformed into JSON - "body": "{{input}}", - "body": { - "name": "{{input.name}}", - "email": "{{input.email}}" - } - } +{ + "input_schema": { + "example": { + "name": "John Doe", + "email": "johndoe@gmail.com" + }, + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["name", "email"] + }, + // both of these methods are identical, since {{input}} will be transformed into JSON + "body": "{{input}}", + "body": { + "name": "{{input.name}}", + "email": "{{input.email}}" + } +} ``` + + @@ -247,6 +267,7 @@ slug: api-v1/post/tools-tool-id The path to the data you want must be in JSON Path format. Generally this means using dot notation to traverse the JSON object and is only required if you need to use that information on other tools or the response is too large. Example: + ```json // If the external API response is: { @@ -288,6 +309,7 @@ slug: api-v1/post/tools-tool-id "prompt": "The store is located at {{address_info.street}}, {{address_info.city}}, {{address_info.state}} {{zip_code}}." } ``` + @@ -298,11 +320,13 @@ slug: api-v1/post/tools-tool-id The default timeout is 10 seconds (10000 milliseconds). To always wait for a response, set the timeout to an extremely high value like 99999999. + ### Response + - Whether the tool creation succeeded. + Whether the tool creation succeeded. @@ -317,6 +341,7 @@ slug: api-v1/post/tools-tool-id ] } ``` + @@ -327,4 +352,3 @@ slug: api-v1/post/tools-tool-id } ``` - \ No newline at end of file diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools.mdx index 2faf45e84c..711a608537 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/tools.mdx @@ -33,8 +33,9 @@ slug: api-v1/post/tools - `play` - `dial` - `hang` - + Choosing too similar of names to the default tools could cause the AI to select the wrong one, so decriptive two to three-word names are preferred. + @@ -47,6 +48,7 @@ slug: api-v1/post/tools - `Press Buttons`: Presses buttons on phone. Each character is a different button. - `Wait`: Wait and go silent for an extended period of time (only use if absolutely necessary). - `Finish`: Say a goodbye message and end the call once completed. + @@ -59,44 +61,49 @@ slug: api-v1/post/tools Special Note: You can have the AI dynamically generate speech by defining `input.speech` in the `input_schema`. + ```json - { - "input_schema": { - "example": { - "speech": "Checking your account details right now John!", - "name": "John Doe", - "email": "johndoe@gmail.com" - }, - "type": "object", - "properties": { - "speech": { - "type": "string" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["speech", "name", "email"] - } - } +{ + "input_schema": { + "example": { + "speech": "Checking your account details right now John!", + "name": "John Doe", + "email": "johndoe@gmail.com" + }, + "type": "object", + "properties": { + "speech": { + "type": "string" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["speech", "name", "email"] + } +} ``` + + This is the endpoint of the external API that the tool will call. It must begin with `https://` and be a valid URL. + This is the HTTP method that the tool will use to call the external API. Valid options are `GET` and `POST`. + @@ -109,22 +116,25 @@ slug: api-v1/post/tools Since prompt variables are supported, you can use them in the headers to send dynamic information to the external API. + ```json - // At the top level of your send call request you can define variables that you can access later using the double curly braces/dot syntax. +// At the top level of your send call request you can define variables that you can access later using the double curly braces/dot syntax. +{ + "request_data": { + "api_key": "sk-1234567890" + }, + "tools": [ { - "request_data": { - "api_key": "sk-1234567890", - }, - "tools": [ - { - "headers": { - "Authorization": "Bearer {{api_key}}" - } - } - ] + "headers": { + "Authorization": "Bearer {{api_key}}" + } } + ] +} ``` + + @@ -139,6 +149,7 @@ slug: api-v1/post/tools Note: `GET` requests do not have a body. + ```json // AI-generated input is created as the `input` Prompt Variable - and the structure is defined by the input schema. // `input` will match the structure of `input_schema.example` if it is defined. @@ -155,7 +166,9 @@ slug: api-v1/post/tools } } ``` + + @@ -168,16 +181,19 @@ slug: api-v1/post/tools This is generally used with GET requests and built-in Prompt Variables like `"{{phone_number}}"` or `"{{call_id}}"`. + ```json - // appends ?pn={{phone_number}}&callId={{call_id}} to the URL - { - "query": { - "pn": "{{phone_number}}", - "callId": "{{call_id}}" - } - } +// appends ?pn={{phone_number}}&callId={{call_id}} to the URL +{ + "query": { + "pn": "{{phone_number}}", + "callId": "{{call_id}}" + } +} ``` + + @@ -204,34 +220,37 @@ slug: api-v1/post/tools Agent input can be nested, and the will be transformed into JSON even if it's initially a string. + ```json - { - "input_schema": { - "example": { - "name": "John Doe", - "email": "johndoe@gmail.com" - }, - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "required": ["name", "email"] - }, - // both of these methods are identical, since {{input}} will be transformed into JSON - "body": "{{input}}", - "body": { - "name": "{{input.name}}", - "email": "{{input.email}}" - } - } +{ + "input_schema": { + "example": { + "name": "John Doe", + "email": "johndoe@gmail.com" + }, + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["name", "email"] + }, + // both of these methods are identical, since {{input}} will be transformed into JSON + "body": "{{input}}", + "body": { + "name": "{{input.name}}", + "email": "{{input.email}}" + } +} ``` + + @@ -242,6 +261,7 @@ slug: api-v1/post/tools The path to the data you want must be in JSON Path format. Generally this means using dot notation to traverse the JSON object and is only required if you need to use that information on other tools or the response is too large. Example: + ```json // If the external API response is: { @@ -283,6 +303,7 @@ slug: api-v1/post/tools "prompt": "The store is located at {{address_info.street}}, {{address_info.city}}, {{address_info.state}} {{zip_code}}." } ``` + @@ -293,11 +314,13 @@ slug: api-v1/post/tools The default timeout is 10 seconds (10000 milliseconds). To always wait for a response, set the timeout to an extremely high value like 99999999. + ### Response + - Whether the tool creation succeeded. + Whether the tool creation succeeded. @@ -312,6 +335,7 @@ slug: api-v1/post/tools ] } ``` + @@ -322,4 +346,3 @@ slug: api-v1/post/tools } ``` - \ No newline at end of file diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/voices-id-sample.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/voices-id-sample.mdx index c53a259cd0..10f6c37c0e 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/voices-id-sample.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/api-v1/post/voices-id-sample.mdx @@ -20,9 +20,10 @@ slug: api-v1/post/voices-id-sample ### Request Body - The text content to be spoken in the voice sample. + The text content to be spoken in the voice sample. + +Character limit: `200` characters. - Character limit: `200` characters. @@ -32,24 +33,14 @@ slug: api-v1/post/voices-id-sample The language of the text content. Default is `ENG`. - Some other language codes: "ESP", "GER", "FRE" +Some other language codes: "ESP", "GER", "FRE" + ### Response - The generated audio file of the spoken text using the specified or overridden voice preset settings. + The generated audio file of the spoken text using the specified or overridden voice preset settings. - -```json -(Generated audio file) -``` - - - - - - - - +```json (Generated audio file) ``` diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/development.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/development.mdx index 45b028f0f0..2a2834653f 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/development.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/development.mdx @@ -5,10 +5,7 @@ slug: development --- - - **Prerequisite** You should have installed Node.js (version 18.10.0 or - higher). - +**Prerequisite** You should have installed Node.js (version 18.10.0 or higher). Step 1. Install Mintlify on your OS: @@ -64,15 +61,12 @@ yarn global upgrade mintlify ## Deployment - - Unlimited editors available under the [Startup - Plan](https://mintlify.com/pricing) - +Unlimited editors available under the [Startup Plan](https://mintlify.com/pricing) You should see the following if the deploy successfully went through: - + ## Troubleshooting @@ -98,12 +92,3 @@ Repeat step 3. Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line) - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/enterprise-features/custom-twilio.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/enterprise-features/custom-twilio.mdx index b609121172..466694470e 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/enterprise-features/custom-twilio.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/enterprise-features/custom-twilio.mdx @@ -10,13 +10,14 @@ slug: enterprise-features/custom-twilio Enterprise customers can connect their own Twilio account to Bland. Easily bring over your existing phone numbers, integrations, and more. Pre-requisites: + - Your own Twilio account - An [Enterprise plan](https://forms.default.com/361589) with Bland ## Step 1: Creating an Encrypted Key with your Twilio Credentials 1. Go to your [Twilio Console](https://www.twilio.com/console) and get your Account SID and Auth Token. -2. Create an `encrypted_key` by [sending an API request](../api-v1/post/accounts.mdx) to Bland. +2. Create an `encrypted_key` by [sending an API request](../api-v1/post/accounts.mdx) to Bland. This is the only time that your `encrypted_key` will be returned to you. Make sure to store it securely, and new keys will need to be generated if lost. @@ -28,12 +29,13 @@ For example: ```json { - "Authorization": "BLAND_API_KEY", - "encrypted_key": "YOUR_ENCRYPTED_KEY" + "Authorization": "BLAND_API_KEY", + "encrypted_key": "YOUR_ENCRYPTED_KEY" } ``` -Note: +Note: + - You can set your `from` number in the API request - this will need to be a number owned by that Twilio account (and not one purchased through Bland). - By default, we'll send calls from a randomly selected number in the specified Twilio account if a `from` is not specified. @@ -48,4 +50,4 @@ We'll validate that these numbers are owned by that account and add them to your Note: When updating inbound numbers, the headers need to include the `encrypted_key` in addition to the `Authorization` header. Doing so makes sure the updates are applied to the correct Twilio account. -Once you update an inbound number through the [Dev Portal](https://app.bland.ai) or [API](../api-v1/post/inbound-number-update.mdx), that number will be automatically configured to run on Bland's infrastructure. No additional steps are required! \ No newline at end of file +Once you update an inbound number through the [Dev Portal](https://app.bland.ai) or [API](../api-v1/post/inbound-number-update.mdx), that number will be automatically configured to run on Bland's infrastructure. No additional steps are required! diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/code.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/code.mdx index 42fa072526..3f8f9749d9 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/code.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/code.mdx @@ -36,12 +36,3 @@ class HelloWorld { } ``` ```` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/images.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/images.mdx index d3aa23514a..ae81f98b4d 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/images.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/images.mdx @@ -5,10 +5,7 @@ slug: essentials/images --- - + ## Image @@ -40,7 +37,7 @@ To get more customizability with images, you can also use [embeds](/writing-cont frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen - style={{ width: '100%', borderRadius: '0.5rem' }} + style={{ width: "100%", borderRadius: "0.5rem" }} >
@@ -58,12 +55,3 @@ Loads another HTML page within the document. Most commonly used for embedding vi ```html ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/markdown.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/markdown.mdx index 4cfed0a950..eba6554033 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/markdown.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/markdown.mdx @@ -87,12 +87,3 @@ Mintlify supports [LaTeX](https://www.latex-project.org) through the Latex compo ```md 8 x (vk x H1 - H2) = (0,1) ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/navigation.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/navigation.mdx index 04a9a98964..3e5fb8d30d 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/navigation.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/navigation.mdx @@ -67,12 +67,3 @@ You cannot use `api` for the name of a folder unless you nest it inside another ## Hidden Pages MDX files not included in `mint.json` will not show up in the sidebar but are accessible through the search bar and by linking directly to them. - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/settings.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/settings.mdx index b2922f455c..9c466cf2eb 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/settings.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/essentials/settings.mdx @@ -60,12 +60,11 @@ Example: `mintlify` Hex color codes for your global theme - The primary color. Used for most often for highlighted content, section - headers, accents, in light mode + The primary color. Used for most often for highlighted content, section headers, accents, in light mode - The primary color for dark mode. Used for most often for highlighted - content, section headers, accents, in dark mode + The primary color for dark mode. Used for most often for highlighted content, section headers, accents, in dark + mode The primary color for important buttons @@ -117,8 +116,8 @@ Example: `mintlify` - Array of version names. Only use this if you want to show different versions - of docs with a dropdown in the navigation bar. + Array of version names. Only use this if you want to show different versions of docs with a dropdown in the navigation + bar. @@ -175,8 +174,8 @@ Example: `mintlify` The name of the tab label. - The start of the URL that marks what pages go in the tab. Generally, this - is the name of the folder you put your pages in. + The start of the URL that marks what pages go in the tab. Generally, this is the name of the folder you put your + pages in. @@ -316,15 +315,6 @@ Example: `mintlify` - A background image to be displayed behind every page. See example with - [Infisical](https://infisical.com/docs) and [FRPC](https://frpc.io). + A background image to be displayed behind every page. See example with [Infisical](https://infisical.com/docs) and + [FRPC](https://frpc.io). - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/examples/call.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/examples/call.mdx index f86a329eb6..1127883336 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/examples/call.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/examples/call.mdx @@ -5,31 +5,30 @@ slug: examples/call --- - + ## Introduction + Imagine you're selling a service, online. Your website contains a contact form where potential customers can request a demo. You know deals will close way more often if you call leads within 5 minutes of their form submission. Unfortunately, you don't have enough hands on deck to make those calls yourself, so you've decided to automate those calls with an AI voice agent. In this example, we'll show you how to call your inbound leads with a personalized prompt. Let's get started! ## Prompt for the phone call + Your phone call prompt should be written as a [template string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) (a string that you can pass variables to). That way, you can insert the data captured from the form into your prompt. Here's what your prompt should look like (before you insert the data from the form). -Your name is Matt, and you're an AI phone agent from Acme Inc. Whenever an inbound lead visits your website, you call them within five minutes. You're direct in your manner of speech. You never repeat yourself. You follow your script as tightly as possible to keep the call on track. +Your name is Matt, and you're an AI phone agent from Acme Inc. Whenever an inbound lead visits your website, you call them within five minutes. You're direct in your manner of speech. You never repeat yourself. You follow your script as tightly as possible to keep the call on track. Here's how the typical phone call progresses: + 1. You introduce yourself 2. You ask qualification customers based on the customer type (startup, small business, enterprise) 3. If the customer is qualified, you explain that you'll text them a scheduling link right after the call 4. You end the phone call - **Example dialogue** You: Hello! @@ -71,6 +70,7 @@ Person: Yes, that works for me. You: Fantastic, I'll text you the link right away. Thanks for your time, `${first_name}`. We look forward to potentially working with you. Person: Thank you, Matt. Looking forward to it. + Did you notice how detailed the prompt is? It provides so much context, and explains what character the AI phone agent is playing, why it's playing it, how it should speak, how the call should progress, and even provides an example dialogue. @@ -78,9 +78,10 @@ Did you notice how detailed the prompt is? It provides so much context, and expl Now, check out what the prompt looks like after we insert the form variables. -Your name is Matt, and you're an AI phone agent from Acme Inc. Whenever an inbound lead visits your website, you call them within five minutes. You're direct in your manner of speech. You never repeat yourself. You follow your script as tightly as possible to keep the call on track. +Your name is Matt, and you're an AI phone agent from Acme Inc. Whenever an inbound lead visits your website, you call them within five minutes. You're direct in your manner of speech. You never repeat yourself. You follow your script as tightly as possible to keep the call on track. Here's how the typical phone call progresses: + 1. You introduce yourself 2. You ask qualification customers based on the customer type (startup, small business, enterprise) 3. If the customer is qualified, you explain that you'll text them a scheduling link right after the call @@ -127,6 +128,7 @@ Person: Yes, that works for me. You: Fantastic, I'll text you the link right away. Thanks for your time, Jordan. We look forward to potentially working with you. Person: Thank you, Matt. Looking forward to it. + ## Customizing the phone agent @@ -142,11 +144,3 @@ For clarity's sake, we'll include those in our code example anyone. The code example is present on the right hand section of this page. You can copy it, either in Javascript or Python. Have additional questions? Want to see other use cases? Join our [discord community](https://discord.gg/QvxDz8zcKe)! - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/quickstart.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/quickstart.mdx index f8bacb5726..8faa8e1cc4 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/quickstart.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/quickstart.mdx @@ -13,20 +13,16 @@ Learn how to update your docs locally and and deploy them to the public. - During the onboarding process, we created a repository on your Github with - your docs content. You can find this repository on our - [dashboard](https://dashboard.mintlify.com). To clone the repository - locally, follow these - [instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) - in your terminal. + During the onboarding process, we created a repository on your Github with your docs content. You can find this + repository on our [dashboard](https://dashboard.mintlify.com). To clone the repository locally, follow these + [instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) in + your terminal. - Previewing helps you make sure your changes look as intended. We built a - command line interface to render these changes locally. 1. Install the - [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the - documentation changes locally with this command: ``` npm i -g mintlify ``` - 2. Run the following command at the root of your documentation (where - `mint.json` is): ``` mintlify dev ``` + Previewing helps you make sure your changes look as intended. We built a command line interface to render these + changes locally. 1. Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation + changes locally with this command: ``` npm i -g mintlify ``` 2. Run the following command at the root of your + documentation (where `mint.json` is): ``` mintlify dev ``` @@ -35,18 +31,15 @@ Learn how to update your docs locally and and deploy them to the public. - Our Github app automatically deploys your changes to your docs site, so you - don't need to manage deployments yourself. You can find the link to install on - your [dashboard](https://dashboard.mintlify.com). Once the bot has been - successfully installed, there should be a check mark next to the commit hash - of the repo. + Our Github app automatically deploys your changes to your docs site, so you don't need to manage deployments yourself. + You can find the link to install on your [dashboard](https://dashboard.mintlify.com). Once the bot has been + successfully installed, there should be a check mark next to the commit hash of the repo. [Commit and push your changes to - Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push) - for your changes to update in your docs site. If you push and don't see that - the Github app successfully deployed your changes, you can also manually - update your docs through our [dashboard](https://dashboard.mintlify.com). + Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push) for your + changes to update in your docs site. If you push and don't see that the Github app successfully deployed your changes, + you can also manually update your docs through our [dashboard](https://dashboard.mintlify.com). @@ -61,37 +54,16 @@ Add content directly in your files with MDX syntax and React components. You can Add flair to your docs with personalized branding. - + Implement your OpenAPI spec and enable API user interaction. - + Draw insights from user interactions with your documentation. - + Keep your docs on your own website's subdomain. - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/starter-guide.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/starter-guide.mdx index 29230a633e..ba70eebb35 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/starter-guide.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/starter-guide.mdx @@ -6,13 +6,15 @@ slug: starter-guide ## Creating a developer account + -To get started, sign up on the developer portal. +To get started, sign up on the developer portal. Enter your phone number and verification code. Finally, once your developer portal loads, go to the `Send phone call` page. ## Sending your first phone call + Although Bland is an API-first platform, the send phone call page provides a simple interface for quickly testing calls. On the left side you can adjust the call options and on the right hand side you can see how the code updates. @@ -20,20 +22,21 @@ Although Bland is an API-first platform, the send phone call page provides a sim Once you're satisfied with a call, copy the code on the right side (in Javascript, Python, or cURL) and add it to your application. - - In the `Phone Number` field, enter your own phone number. - + In the `Phone Number` field, enter your own phone number. - For the task box either select one of the example prompts or write your own. For more instrucionts about prompting your AI phone agent, read this blog post. + For the task box either select one of the example prompts or write your own. For more instrucionts about prompting + your AI phone agent, read this blog post. - Scroll to the bottom of the page, and press the `Send call` button. Note, calls are charged at $0.12/minute, billed to the exact second. + Scroll to the bottom of the page, and press the `Send call` button. Note, calls are charged at $0.12/minute, billed + to the exact second. To send a phone call programatically, read the API reference. ## Testing your phone agent + Once you've sent your first phone call, the next step is to test and improve the outputs from your phone agent. @@ -45,17 +48,18 @@ One way to test your agent is to send yourself test calls. A faster way, however Select the model and language and insert your current prompt into the task box. - Start messaging your phone agent. Act like you're the person receiving the call, and purposefully ask edge-case questions to throw the phone agent off. - - - Based on the responses you receive, update the instructions in the prompt. + Start messaging your phone agent. Act like you're the person receiving the call, and purposefully ask edge-case + questions to throw the phone agent off. + Based on the responses you receive, update the instructions in the prompt. ## Next steps + You now know how to send and test phone calls, but you've only scratched the surface of Bland's capabilties. Areas for further exploration: + Read the API reference. @@ -70,4 +74,3 @@ Areas for further exploration: See what people are building on Bland and get support from other users. - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/custom-tools.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/custom-tools.mdx index e4b4b86d7e..6e139477fc 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/custom-tools.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/custom-tools.mdx @@ -8,6 +8,7 @@ slug: tutorials/custom-tools ## Introduction Custom tools allow your agent to interact with any web API mid-call. Do things like: + Dispatch SMS or emails using the person's contact info. @@ -24,6 +25,7 @@ Custom tools allow your agent to interact with any web API mid-call. Do things l ## Background + To understand how custom tools work, let's take a peek under the hood of the Bland AI phone agent. During the conversation, the phone agent is constantly listening to figure out when it's supposed to respond. When the phone agent realizes it's time to respond, it reviews the tools in its toolbox and picks between them. @@ -31,6 +33,7 @@ During the conversation, the phone agent is constantly listening to figure out w Those tools include a `speak`, `wait`, and `button press` tool. When you create a custom tool, you add it to the existing 'toolbox' for the phone agent to pick from. A few natural questions arise: + 1. How do I define my custom tool? 2. How do I make sure my tool gets picked at the right time? 3. How does information from the call get passed to my custom tool's API request? @@ -42,6 +45,7 @@ Keep reading to find out. # Creating your custom tool ## Defining the API request + Imagine you're creating an AI phone agent to take restaurant orders. You want your phone agent to have the ability to place orders, by pinging your backend API. Here's what that request might look like: @@ -74,6 +78,7 @@ Here's what that request might look like: ## From API request to custom tool The next step is to convert the API request into a custom tool. Custom tools have the following properties: + - `name` - the agent will see this in the list of tools - `description` - a short explanation of what the tool does - `input_schema` - a JSON schema describing the input data @@ -81,11 +86,13 @@ The next step is to convert the API request into a custom tool. Custom tools hav - `response_data` - An array of objects that describe how to extract data from the response. Within the response data, you can create variables that the phone agent can reference in its prompt. ### Name & Description + The agent will see the name in the list of tools. The name, plus the description, help the AI phone agent when it decides which tool to use. For this example we'll set the name to `PlaceOrder`, and the description to `Places the final order for the drive thru`. ### Input Schema + The input schema is critical. It defines the shape of the API request, the different inputs the request can take, and also includes an example (which helps our system when creating requests). Here's what the input schema could look like: @@ -151,12 +158,14 @@ Here's what the input schema could look like: ``` Two important notes about input schema: + 1. `input_schema` is converted into the variable `"{{input}}"` that you can use in the request body/query/headers 2. To access nested properties, use dot notation: `"{{input.property.subproperty}}"` Scroll down to see the full example. ### Speech + Because requesting external APIs might take a while, we enable you to define a `speech` property. The phone agent will say the `speech` while it makes the request. An example speech might look like: `Perfect, I'll schedule that right now, give me just a second.` @@ -164,6 +173,7 @@ An example speech might look like: `Perfect, I'll schedule that right now, give For the restaurant ordering example, the speech could be `Thank you, placing that order now.` ### Response data + Once your API request comes back, you need to extract the response data, and then make the phone agent aware of the new information. The `data` field determines how you extract the data while the `name` field determines the variable name for reference in the prompt. @@ -185,103 +195,85 @@ Below is the entire API request for sending a phone call using the outlined cust ```json { - "phone_number": "...", - // note that the returned value ({{order_price}}) in the task is populated only after the tool is run - "task": "You are taking a drive thru order from a customer. Find out everything that they want like a drive thru cashier. Continue until they say they're done. Repeat the full order back to them after that, and ask if that's correct. If they confirm that it's correct, then and only then will you place their order using the PlaceOrder tool. After you place it, tell them their order total and to pull forward. Their order price is {{order_price}}", - "first_sentence": "Hi, what can I get started for you today?", - "request_data": { - "menu": { - "burger": [ - "patties" - ], - "fry": [ - "size" - ], - "shake": [ - "flavor", - "size" - ] - } - }, - "tools": [ - { - "name": "PlaceOrder", - "description": "Places the final order for the drive thru.", - "speech": "Thank you, placing that order now.", - "input_schema": { - "example": { - "items": [ - { - "name": "burger", - "patties": 2, - "quantity": 3 - }, - { - "name": "fry", - "size": "lg", - "quantity": 2 - } - ] - }, - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "patties": { - "type": "integer" - }, - "size": { - "type": "string", - "enum": [ - "sm", - "md", - "lg" - ] - }, - "flavor": { - "type": "string", - "enum": [ - "chocolate", - "strawberry", - "vanilla" - ], - "default": "vanilla" - }, - "quantity": { - "type": "integer" - } - }, - "required": [ - "name", - "quantity" - ] - } - } - } - }, - "url": "https://api.your-restaurant.com/orders", - "method": "POST", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer ..." - }, - "body": { - "items": "{{input.items}}" + "phone_number": "...", + // note that the returned value ({{order_price}}) in the task is populated only after the tool is run + "task": "You are taking a drive thru order from a customer. Find out everything that they want like a drive thru cashier. Continue until they say they're done. Repeat the full order back to them after that, and ask if that's correct. If they confirm that it's correct, then and only then will you place their order using the PlaceOrder tool. After you place it, tell them their order total and to pull forward. Their order price is {{order_price}}", + "first_sentence": "Hi, what can I get started for you today?", + "request_data": { + "menu": { + "burger": ["patties"], + "fry": ["size"], + "shake": ["flavor", "size"] + } + }, + "tools": [ + { + "name": "PlaceOrder", + "description": "Places the final order for the drive thru.", + "speech": "Thank you, placing that order now.", + "input_schema": { + "example": { + "items": [ + { + "name": "burger", + "patties": 2, + "quantity": 3 }, - "response_data": [ - { - "name": "order_price", - "data": "$.price" + { + "name": "fry", + "size": "lg", + "quantity": 2 + } + ] + }, + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "patties": { + "type": "integer" + }, + "size": { + "type": "string", + "enum": ["sm", "md", "lg"] + }, + "flavor": { + "type": "string", + "enum": ["chocolate", "strawberry", "vanilla"], + "default": "vanilla" + }, + "quantity": { + "type": "integer" } - ] + }, + "required": ["name", "quantity"] + } + } } - ] + }, + "url": "https://api.your-restaurant.com/orders", + "method": "POST", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer ..." + }, + "body": { + "items": "{{input.items}}" + }, + "response_data": [ + { + "name": "order_price", + "data": "$.price" + } + ] + } + ] } ``` @@ -294,27 +286,32 @@ Below is the entire API request for sending a phone call using the outlined cust Then the phone agent extracts the information from the transcript and passes it to the request body. You can improve the accuracy of the input data by creating a very clear `input_schema`. That includes providing a detailed `example` within. - - - The phone agent looks at the tool's name and description. Then it looks at the current context of the conversation to decide whether using the tool makes sense. +{" "} + + + The phone agent looks at the tool's name and description. Then it looks at the current context of the conversation to + decide whether using the tool makes sense. + + When the API response from the custom tool comes back, you can extract the API response and create variables. You can do this within the `response_data` property. Once you've given the variable a `name`, you can reference it in the prompt using double brackets (`{{}}`). Note, with the current setup, you might reference variables that have null values. Here's the restaurant example prompt: - + You are taking a drive thru order from a customer. Find out everything that they want like a drive thru cashier. Continue until they say they're done. Repeat the full order back to them after that, and ask if that's correct. If they confirm that it's correct, then and only then will you place their order using the PlaceOrder tool. After you place it, tell them their order total and to pull forward. Their order price is `{{order_price}}` - - In the above prompt, the `order_price` will be null until the data comes back. That's okay though. The prompt is structured to first take the order, then use the PlaceOrder tool, and then finally respond with the order price. + + In the above prompt, the `order_price` will be null until the data comes back. That's okay though. The prompt is structured to first take the order, then use the PlaceOrder tool, and then finally respond with the order price. By the time the phone agent is asked for the order price, it will have the information. Custom tools will continue getting more robust, to further prevent scenarios where variables without value from being referenced in prompts. + -If you have any additional questions, reach out at hello@bland.ai and one of our engineers will help. \ No newline at end of file +If you have any additional questions, reach out at hello@bland.ai and one of our engineers will help. diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/dynamic-data.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/dynamic-data.mdx index d7a02b61f1..d55a9b1f41 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/dynamic-data.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/dynamic-data.mdx @@ -10,6 +10,7 @@ slug: tutorials/dynamic-data With Dynamic Data, you can make external API requests at the start and throughout your phone call. This allows you to load data from your database, or from any other API. You can then use that data in your AI responses, or to define circumstantial behavior for each call. Some examples of what Dynamic Data enables: + - Maintain conversation history between calls - Define behavior based on the user's location - Handle real-time data like status updates or prices @@ -73,7 +74,7 @@ Here's how to make an [Inbound Agent](../api-v1/post/inbound-number-update.mdx) ] }, { - // Helpful tip for debugging: + // Helpful tip for debugging: // You can send the data to a webhook to see what it looks like "url": "https://webhook.site/...", "method": "POST", @@ -97,6 +98,7 @@ Here's how to make an [Inbound Agent](../api-v1/post/inbound-number-update.mdx) We'll cover the following features in this section: + - System variables - External API requests - Extracting data from responses @@ -110,6 +112,7 @@ Variables are defined with double curly braces, like `{{variable}}`. System vari Note: Variables are NOT case sensitive, and outer spaces are trimmed automatically. Base variables: + - `{{phone_number}}` - Always the other party's number - `{{country}}` - The country code (ex. US) - `{{state}}` - The state or province's abbreviation (ex. CA for California) @@ -127,7 +130,7 @@ Variables can be used mid-sentence, like this: ```json { - "task": "... Today is {{now}} ..." + "task": "... Today is {{now}} ..." } ``` @@ -155,16 +158,11 @@ Here's a simple request that can be used to load public data about the current p ``` -- `timeout` - The maximum number of milliseconds to wait for a response. - - Default: `2000` -- `method` - The HTTP method to use. - - Defaults to `GET`, otherwise `POST` is allowed. -- `headers` - An object of headers to send with the request. -- `body` - The body of the request. Only used if `method` is `POST`. -- `response_data` - An array of objects that define how to extract data from the response. - - See the next section for more details. -- `cache` - Whether to store the response, or refresh that data before each AI response. - - Defaults to `true`. + - `timeout` - The maximum number of milliseconds to wait for a response. - Default: `2000` - `method` - The HTTP + method to use. - Defaults to `GET`, otherwise `POST` is allowed. - `headers` - An object of headers to send with the + request. - `body` - The body of the request. Only used if `method` is `POST`. - `response_data` - An array of objects + that define how to extract data from the response. - See the next section for more details. - `cache` - Whether to + store the response, or refresh that data before each AI response. - Defaults to `true`. ## Extracting Data from Responses @@ -173,20 +171,20 @@ Rather than using the full response, you can extract specific data from the resp ```json { - "bpi": { - "USD": { - "code": "USD", - "rate": "9,000.00", - "description": "United States Dollar", - "rate_float": 9000 - }, - "GBP": { - "code": "GBP", - "rate": "6,000.00", - "description": "British Pound Sterling", - "rate_float": 6000 - } + "bpi": { + "USD": { + "code": "USD", + "rate": "9,000.00", + "description": "United States Dollar", + "rate_float": 9000 + }, + "GBP": { + "code": "GBP", + "rate": "6,000.00", + "description": "British Pound Sterling", + "rate_float": 6000 } + } } ``` @@ -194,10 +192,9 @@ Then `$.bpi.USD.rate` would return `9,000.00`. More complex filters can be used if they follow the [JSONPath format](https://docs.hevodata.com/sources/engg-analytics/streaming/rest-api/writing-jsonpath-expressions). - ## Variables as Parameters -Once defined with `response_data`, variables can be used nearly anywhere. +Once defined with `response_data`, variables can be used nearly anywhere. - In the `task` or `prompt` parameters - In the `context` parameter of `response_data` @@ -215,70 +212,59 @@ For this example, imagine a delivery service that offers instant checkout for cu ```json { - "dynamic_data": [ + "dynamic_data": [ + { + "url": "https://api.restaurant.com/customers", + "method": "GET", + "headers": { + "authorization": "ExtremelySecureCredentials" + }, + "query": { + "phone_number": "{{phone_number}}" + }, + "response_data": [ { - "url": "https://api.restaurant.com/customers", - "method": "GET", - "headers": { - "authorization": "ExtremelySecureCredentials" - }, - "query": { - "phone_number": "{{phone_number}}" - }, - "response_data": [ - { - "name": "member_id", - "data": "$.customer.member_id" - } - ] - }, - //... - ] + "name": "member_id", + "data": "$.customer.member_id" + } + ] + } + //... + ] } ``` We just created that `{{member_id}}` variable - now we can use it in the next request. -This delivery service also can be called to check on an order status. +This delivery service also can be called to check on an order status. Note a difference: The `cache` parameter is set to `false`, so if the order status changes during the call, the agent will immediately know about it and be able to inform the customer. ```json { - "dynamic_data": [ - //... + "dynamic_data": [ + //... + { + "url": "https://api.restaurant.com/orders", + "method": "GET", + "cache": false, + "headers": { + "authorization": "ExtremelySecureCredentials" + }, + "query": { + "member_id": "{{member_id}}" + }, + "response_data": [ { - "url": "https://api.restaurant.com/orders", - "method": "GET", - "cache": false, - "headers": { - "authorization": "ExtremelySecureCredentials" - }, - "query": { - "member_id": "{{member_id}}" - }, - "response_data": [ - { - "name": "order_id", - "data": "$.orders[0].id" - }, - { - "name": "order_status", - "data": "$.orders[0].status" - } - ] + "name": "order_id", + "data": "$.orders[0].id" + }, + { + "name": "order_status", + "data": "$.orders[0].status" } - ] + ] + } + ] } ``` - - - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/live-transfer.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/live-transfer.mdx index 71e3654cf0..dd4df6e3dc 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/live-transfer.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/live-transfer.mdx @@ -83,12 +83,3 @@ response = requests.post('https://api.bland.ai/v1/calls', json=data, headers=hea ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/max-duration.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/max-duration.mdx index 91a9608fd5..d882c59118 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/max-duration.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/max-duration.mdx @@ -85,12 +85,3 @@ response = requests.post('https://api.bland.ai/v1/calls', json=data, headers=hea ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/pathways.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/pathways.mdx index 9d3c1e6905..6b69ff95f8 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/pathways.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/pathways.mdx @@ -9,13 +9,14 @@ slug: tutorials/pathways [Template Pathway Video Tutorial](https://www.loom.com/share/be9d6f1072ae4267abc0717e36e66078?sid=82a7843f-9e7c-457a-8f7b-4d8ca026e1ff) - ## Introduction Conversational pathways are our new way of prompting Bland that has led to major breakthroughs in realism. + - Give your agent instructions on how it should respond at specific points of the conversation. Choose between prompting or fixed sentences. + Give your agent instructions on how it should respond at specific points of the conversation. Choose between + prompting or fixed sentences. Execute webhooks at any point during the conversation, and send speech during/after the webhook. @@ -54,7 +55,6 @@ In order to instruct the agent when to take this pathway, you would click on the And there you have it! You have now created a pathway from one node to another, and instructed the agent when to take this pathway. You can connect as many nodes as you want in this manner, and create as many pathways as you want. In order to create a new Node, press the 'Add new Node' button at the top-left of the screen. - # How the Pathways Agent Works The agent starts at the first node, and then moves to the next node based on the pathway that the agent decides to take. The agent will then execute the instructions in the node as dialogue, and then move on to the next node based on the pathway that the agent decides to take. This process will continue until the agent decides to end the call. @@ -63,7 +63,7 @@ The agent will make decisions based on the labels you put in the pathways, when -For Example, +For Example, In this example, at the node named 'Ask for reservation info', the node asks for the user's reservation information. Based on the user's response, the agent will then move on to the next node based on the labels you put in the pathways. For the current node, it will check if the user has provided reservation information where the number of guests is either less than 8 or more than 8. If the user has provided reservation information where the number of guests is less than 8, the agent will move on to the node named 'Reservation booking'. If the user has provided reservation information where the number of guests is more than 8, the agent will move on to the node named 'Transfer Call'. The agent will then execute the instructions in the node as dialogue, and then move on to the next node based on the pathway that the agent decides to take. And the process repeats! @@ -77,29 +77,28 @@ This helps you to ensure that the user provides the necessary information before - ## Global Nodes -Global Nodes take precendence over the condition decisions made by the agent. You can treat a global node as a node, that every other node in the pathway has a pathway to, with the label as the 'Global Pathway Label'. +Global Nodes take precendence over the condition decisions made by the agent. You can treat a global node as a node, that every other node in the pathway has a pathway to, with the label as the 'Global Pathway Label'. Using the Reservation Booking Example, if the user were to ask a question like 'What are the opening hours of the restaurant' when the agent is at the 'Ask for reservation info' node, the condition decision would not be met as the user did not provide the date, time, and number of guests for the reservation. However, the pathway label would be 'user has a question about the restaurant's hours or location', which links to a Global Node. As Global Nodes take precedence over the condition decision, the agent would then move to the 'Global Node' named 'Restaurant Questions' and provide the user with the opening hours of the restaurant. After providing the user with the opening hours of the restaurant, the agent would then automatically return to the 'Ask for reservation info' node, and continue with the flow of the conversation. This helps you to handle edge cases where the user might ask a question that is not related to the current conversation, and allows you to provide the user with the information they need, before returning to the conversation. -Tip: The variables `{{lastUserMessage}}` and `{{prevNodePrompt}}` can be used in the Global Node to provide the agent with context on what the user said, and steering the conversation back to its own original goal. +Tip: The variables `{{lastUserMessage}}` and `{{prevNodePrompt}}` can be used in the Global Node to provide the agent with context on what the user said, and steering the conversation back to its own original goal. -You are to answer any questions the user has, to the best of your knowledge. If you do not know the answer, simply say 'I don't have that information at that moment'. Do not make up any information/facts about the appointment. +You are to answer any questions the user has, to the best of your knowledge. If you do not know the answer, simply say 'I don't have that information at that moment'. Do not make up any information/facts about the appointment. After you answer the question, you are to direct the conversation back to your initial goal, which was as follows: Previous Goal: `{{prevNodePrompt}}` -If you deem the goal as achieved, you can simply ask the user 'So, shall we proceed?' . If the goal has not been achieved, you are to steer the conversation back to achieve your goal. -If you deem the goal as achieved, simply confirm the result with the user. If the goal has not been achieved, you are to steer the conversation back to achieve your goal. +If you deem the goal as achieved, you can simply ask the user 'So, shall we proceed?' . If the goal has not been achieved, you are to steer the conversation back to achieve your goal. +If you deem the goal as achieved, simply confirm the result with the user. If the goal has not been achieved, you are to steer the conversation back to achieve your goal. ``` Examples @@ -109,73 +108,71 @@ user: what day is it today? assistant: The day today is April 15th. So, what date works for you? -- --- +-- assistant: what date works for you? user: probably tomorrow, what time does the clinic open? assistant: The clinic opens at 9am. So, do you want to schedule for tomorrow? --- +-- ``` + - # Node Types - There are currently 6 different types of Nodes -- Default + +- Default - Webhook - Knowledge Base -- End Call +- End Call - Transfer Call - Wait for Response You can select the type of node you want by clicking on the dropdown of `Node Type`. - ## Base/Default Node (Important!) The default node provides the ability to generate a response to the user. This functionality is exposed to all other nodes as well. You can either: -- Use the `Prompt` field to give instructions on what the agent should do at this point in the conversation. This is the recommended way to generate responses as it makes the conversation more human and natural. -- Enable the 'Static Text' toggle to provide a fixed response, and the agent will always say the same thing at this point in the conversation. +- Use the `Prompt` field to give instructions on what the agent should do at this point in the conversation. This is the recommended way to generate responses as it makes the conversation more human and natural. +- Enable the 'Static Text' toggle to provide a fixed response, and the agent will always say the same thing at this point in the conversation. ### Optional Decision Guide -The optional decision guide is only to be used if your phone agent currently is not going down the correct pathway. We do not expect this to happen often, but still want to provide you the tools to handle these issues if they arise. +The optional decision guide is only to be used if your phone agent currently is not going down the correct pathway. We do not expect this to happen often, but still want to provide you the tools to handle these issues if they arise. It is a way to provide the phone agent with example scenarios of what the user might say, and what pathway the agent should take in response. You would put in examples of what the user might say in the `User Input` field, and then in the `Pathway` field, you would provide the pathway the agent should take in response. -### Condition +### Condition -The condition is a way to provide the agent with a condition that must be met in order for the agent to move on to the next node. If the condition is not met, the agent will stay on the same node and ensure the condition is met until the condition is fulfilled. +The condition is a way to provide the agent with a condition that must be met in order for the agent to move on to the next node. If the condition is not met, the agent will stay on the same node and ensure the condition is met until the condition is fulfilled. ### Global Nodes -Each node can be configured to be a Global Node. Global Nodes are nodes that are accessible by every other node in the Conversational Pathway. This means that it has an implicit pathway to every other node, and the label would be the 'Global Label'. +Each node can be configured to be a Global Node. Global Nodes are nodes that are accessible by every other node in the Conversational Pathway. This means that it has an implicit pathway to every other node, and the label would be the 'Global Label'. After entering a Global Node, the agent will execute the instructions inside the Global Node, and then automatically return to the node it was at before entering the Global Node, so it can continue with the flow of the conversation. -In a Global Node, you can also forward the agent to another node, by toggling the 'Enable Forwarding', which will allow you to select the node you want to move the agent to. This is useful if you want to move the agent to a existing node for a certain scenario, which could happen at any point in the conversation. +In a Global Node, you can also forward the agent to another node, by toggling the 'Enable Forwarding', which will allow you to select the node you want to move the agent to. This is useful if you want to move the agent to a existing node for a certain scenario, which could happen at any point in the conversation. ## Transfer Call Node -The transfer call node is used to transfer the call to another number when the node is reached, and the dialogue at this node is complete. +The transfer call node is used to transfer the call to another number when the node is reached, and the dialogue at this node is complete. -As such, you may have the agent say any final words before the call is transferred. +As such, you may have the agent say any final words before the call is transferred. - ## End Call Node The end call node will end the call when the node is reached, and the dialogue at this node is complete. @@ -188,7 +185,7 @@ As such, you may have the agent say any final words before the call is ended. The knowledge base node is used to connect your agent to a knowledge base, to answer any questions the user has. -Paste in any text in the 'Knowledge Base' field, and the agent will search through the knowledge base to answer the user. +Paste in any text in the 'Knowledge Base' field, and the agent will search through the knowledge base to answer the user. Coming soon - PDF Upload/Vector Database Integrations... @@ -198,7 +195,6 @@ Coming soon - PDF Upload/Vector Database Integrations... The Wait for Response Node works the same way as the Default Node, except it is also equipped with the ability to wait if the user requires time to respond or needs to hold for a moment. - ## Webhook Node The webhook node is used to execute webhooks at any point during the conversation, and send speech during/after the webhook. @@ -209,7 +205,6 @@ Similar to how the dialogue is handled in all other nodes, you can control the d Variables received from the webhook can be used in the dialogue as well, as shown in the example below. - # Global Prompt for all Nodes @@ -230,9 +225,7 @@ You can test the responses from your pathway agent by clicking on the 'Chat with - - -# Variables Reference/ Extraction +# Variables Reference/ Extraction ## Variables @@ -247,10 +240,9 @@ Some examples of variables that you can access at each node: - `{{to}}` - The phone number the call is to - `{{call_id}}` - The unique identifier for the call - ## Extracting Variables from Call/User Response -At each node, you can also extract variables from the user's response using the `Extract Variables from Call Info` field. You would put in the name of the variable you want to extract, the type of the variable (integer, string, boolean), and the description for what information you want the variable to store. You can also provide specific formats you expect and examples in the description. The more descriptive it is, the better the agent will be at extracting the variable more accurately. +At each node, you can also extract variables from the user's response using the `Extract Variables from Call Info` field. You would put in the name of the variable you want to extract, the type of the variable (integer, string, boolean), and the description for what information you want the variable to store. You can also provide specific formats you expect and examples in the description. The more descriptive it is, the better the agent will be at extracting the variable more accurately. Do note that when enable variable extraction, and wanting to reference the variable in the subsequent nodes, it would introduce slight latency as the agent would have to extract the variable from the user's response before generating the dialogue for the next node. @@ -262,7 +254,7 @@ For Example, the image below shows how the Webhook Node is set up to extract the # Fine Tuning the Pathway agent -While Conversational Pathways gives you a lot greater control compared to the regular call agent, hallucinations can still occur, or the agent might make wrong decisions in the pathway. However, we have provided you with the tools to handle these issues if they arise. Each node can be fine-tuned on the decision it makes, as well as the expected dialogue it generates, allowing you to handle even the most extreme edge cases that might arise easily. +While Conversational Pathways gives you a lot greater control compared to the regular call agent, hallucinations can still occur, or the agent might make wrong decisions in the pathway. However, we have provided you with the tools to handle these issues if they arise. Each node can be fine-tuned on the decision it makes, as well as the expected dialogue it generates, allowing you to handle even the most extreme edge cases that might arise easily. ### Steps to Fine-Tuning the agent @@ -280,12 +272,11 @@ Upon saving your changes, you will be able to see the fine-tuning data in the no Do note that the decisions for the condition and pathway chosen is made by the node the agent is currently at, and the dialogue is generated by the node which the agent decides to take the pathway to. -For Example, +For Example, If the agent is at Node 1, and the agent decides that the condition is achieved, and decides to take the pathway to Node 2, the dialogue generated will be from Node 2, and the decisions for the condition and pathway chosen will be from Node 1. As such, the training data for the condition and pathway chosen will be stored in Node 1, and amendments to the dialogue generated will be stored in Node 2. - # Quick Start with Tutorial / Templates To immediately start playing around with Conversational Pathways, you can use one of our templates. Visit the Conversational Pathways page on our Dev Portal, and duplicate the 'Restaurant Reservation' Template, and run through the agent to see how it works! @@ -295,6 +286,4 @@ We have also created a video walkthrough of that template to help you get starte Create a pathway now! Click [here](https://app.bland.ai/dashboard?page=convo-pathways) to get started! - If you have any additional questions, reach out on our [Discord](https://discord.gg/QvxDz8zcKe) and one of our engineers will help. - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-1000-calls-at-once.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-1000-calls-at-once.mdx index 2b57f58e4f..ae85560473 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-1000-calls-at-once.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-1000-calls-at-once.mdx @@ -87,8 +87,7 @@ const headers = { // Data const data = { - base_prompt: - "You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}.", + base_prompt: "You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}.", call_data: [ { phone_number: "1234567890", @@ -115,12 +114,3 @@ await axios.post("https://api.bland.ai/v1/batches", data, { headers }); ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-first-call.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-first-call.mdx index 8efea0fc3e..7127b68870 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-first-call.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/send-first-call.mdx @@ -108,12 +108,3 @@ response = requests.post('https://api.bland.ai/v1/calls', json=data, headers=hea ``` - - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhook-signing.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhook-signing.mdx index b464966708..83176a4885 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhook-signing.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhook-signing.mdx @@ -21,32 +21,25 @@ To verify a webhook, you need to calculate the HMAC signature of the request bod Note that you must first create a webhook signing secret in the [Account Settings in the Dev Portal](https://app.bland.ai/dashboard?page=settings). Here is an example of how to verify a webhook in Node.js: + ```javascript -const crypto = require('node:crypto'); +const crypto = require("node:crypto"); function verifyWebhookSignature(key, data, signature) { + const expectedSignature = crypto.createHmac("sha256", key).update(data).digest("hex"); - const expectedSignature = crypto.createHmac('sha256', key) - .update(data) - .digest('hex'); - - return expectedSignature === signature; + return expectedSignature === signature; } //... -app.post('/webhook', (req, res) => { - const isValid = verifyWebhookSignature( - process.env.WEBHOOK_SECRET, - JSON.stringify(req.body), - req.headers['x-webhook-signature'] - ); +app.post("/webhook", (req, res) => { + const isValid = verifyWebhookSignature( + process.env.WEBHOOK_SECRET, + JSON.stringify(req.body), + req.headers["x-webhook-signature"], + ); - //... + //... }); ``` - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhooks.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhooks.mdx index 2cbd004178..996e4702ba 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhooks.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/tutorials/webhooks.mdx @@ -49,11 +49,3 @@ To test for outbound calls, once again create your webhook by referring back to Then, follow the [send phone call docs](https://docs.bland.ai/api-v1/post/calls) to create and send a phone call. Make sure you include the `webhook` as a parameter in your request. After, confirm that the webhook data populated on your webhook site page. And again, if you encounter issues, jump into [discord](https://discord.gg/QvxDz8zcKe) and message us - we will help asap. - - - - - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/bland/fern/welcome-to-bland.mdx b/clis/docs-migrator/src/__test__/outputs/bland/fern/welcome-to-bland.mdx index 3ddcd36fc6..26287abac4 100644 --- a/clis/docs-migrator/src/__test__/outputs/bland/fern/welcome-to-bland.mdx +++ b/clis/docs-migrator/src/__test__/outputs/bland/fern/welcome-to-bland.mdx @@ -7,11 +7,13 @@ slug: welcome-to-bland Bland is a platform for AI phone calling. Using our API, you can easily send or receive phone calls with a programmable voice agent. We really care about making our phone calls... + 1. **Fast**: sub-second latency from person speaking to AI responding. 2. **Reliable**: it's our responsibility, day in and day out, to make sure your phone calls work. No exceptions. 3. **Ultra flexible**: configure all aspects of your agent's behavior, by settings it's voice, creating transfer scenarios, configuring the initial greeting, etc. # What you can do with Bland + Dispatch AI phone calls to call customers, leads, and to streamline operations. @@ -34,6 +36,7 @@ We really care about making our phone calls... # Getting started + Read the API reference. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/README.md b/clis/docs-migrator/src/__test__/outputs/zep/fern/README.md index c89c478d15..cfed42991b 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/README.md +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/README.md @@ -24,7 +24,7 @@ mintlify dev ### Publishing Changes -Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. +Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. #### Troubleshooting diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/memories.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/memories.mdx index 99c6730e15..f7bc734572 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/memories.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/memories.mdx @@ -16,6 +16,7 @@ slug: chat-history-memory/memories The Memory and Summary are returned with UUIDs, token counts, timestamps, and other metadata. Memories are associated with [Sessions](sessions.mdx) in a many-to-one relationship. + ## Persisting a Memory to a Session @@ -31,6 +32,7 @@ Sessions are created automatically when adding Memories. If the `SessionID` is a upserted into the Session. [Manually creating a session](sessions.mdx) can be useful if you want to associate it with a user or add metadata. + @@ -60,37 +62,43 @@ messages = [Message(role=m["role"], content=m["content"], metadata=m.get("metada memory = Memory(messages=messages) result = client.memory.add_memory(session_id, memory) ``` + ```typescript import { ZepClient, Message, Memory } from "@getzep/zep-js"; -import * as uuid from 'uuid'; +import * as uuid from "uuid"; -const API_KEY = "" +const API_KEY = ""; const zepClient = await ZepClient.init(process.env.ZEP_API_KEY); const session_id: string = uuid.v4(); // A new session identifier const history: { role: string; content: string; metadata?: { [key: string]: any } }[] = [ - { "role": "Jane", "role_type": "user", "content": "Who was Octavia Butler?" }, - { "role": "HistoryBot", "role_type": "assistant", "content": "Octavia Estelle Butler (June 22, 1947 – February 24, 2006) was an American science fiction author." }, - { "role": "Jane", "role_type": "user", "content": "Which books of hers were made into movies?", "metadata": { "foo": "bar" } }, + { role: "Jane", role_type: "user", content: "Who was Octavia Butler?" }, + { + role: "HistoryBot", + role_type: "assistant", + content: "Octavia Estelle Butler (June 22, 1947 – February 24, 2006) was an American science fiction author.", + }, + { role: "Jane", role_type: "user", content: "Which books of hers were made into movies?", metadata: { foo: "bar" } }, ]; -const messages: Message[] = history.map(m => new Message({ role: m.role, content: m.content, metadata: m.metadata })); +const messages: Message[] = history.map((m) => new Message({ role: m.role, content: m.content, metadata: m.metadata })); const memory: Memory = new Memory({ messages }); const result = client.memory.addMemory(session_id, memory); ``` + - ## Getting a Session's Memory Read more about the difference between [Perpetual and Message Window Buffer Memory](/chat-history-memory). ### Perpetual Memory + The example below uses Zep's async API and a context manager. You may also use the sync API's `client.memory.get_memory` method and use the `client` outside of a context manager. @@ -113,16 +121,16 @@ async with ZepClient(api_key=api_key) as client: ```typescript const client = await ZepClient.init(api_key); try { - const memory = await client.memory.getMemory(session_id, "perpetual"); - for (const message of memory.messages) { - console.log(message.toDict()); - } + const memory = await client.memory.getMemory(session_id, "perpetual"); + for (const message of memory.messages) { + console.log(message.toDict()); + } } catch (error) { - if (error instanceof NotFoundError) { - console.log("Memory not found"); - } else { - throw error; - } + if (error instanceof NotFoundError) { + console.log("Memory not found"); + } else { + throw error; + } } ``` @@ -165,23 +173,25 @@ async with ZepClient(api_key) as client: except NotFoundError: print("Memory not found") ``` + ```typescript const client = await ZepClient.init(api_key); try { - const memory = await client.memory.getMemory(session_id, "message_window"); - for (const message of memory.messages) { - console.log(message.toDict()); - } + const memory = await client.memory.getMemory(session_id, "message_window"); + for (const message of memory.messages) { + console.log(message.toDict()); + } } catch (error) { - if (error instanceof NotFoundError) { - console.log("Memory not found"); - } else { - throw error; - } + if (error instanceof NotFoundError) { + console.log("Memory not found"); + } else { + throw error; + } } ``` + - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/messages.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/messages.mdx index b6f7b25676..4fd6e5f9b1 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/messages.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/messages.mdx @@ -2,12 +2,9 @@ slug: chat-history-memory/messages --- - -Messages are the individual components of a conversation, each linked to a [Session](sessions.mdx) in a many-to-one relationship. -To incorporate messages into sessions, utilize the [Memories](memories.mdx) feature. + + Messages are the individual components of a conversation, each linked to a [Session](sessions.mdx) in a many-to-one + relationship. To incorporate messages into sessions, utilize the [Memories](memories.mdx) feature. ## Get a Specific Message from a Session @@ -36,17 +33,17 @@ async with ZepClient(api_key=api_key) as client: const client: ZepClient = await ZepClient.init(api_key); try { - const session_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc6"; // Replace with the actual session_id - const message_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc7"; // Replace with the actual message_id + const session_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc6"; // Replace with the actual session_id + const message_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc7"; // Replace with the actual message_id - const message: Message = await client.message.getSessionMessage(session_id, message_id); - console.log(message); + const message: Message = await client.message.getSessionMessage(session_id, message_id); + console.log(message); } catch (error) { - if (error instanceof NotFoundError) { - console.log("Message not found"); - } else { - throw error; - } + if (error instanceof NotFoundError) { + console.log("Message not found"); + } else { + throw error; + } } ``` @@ -85,6 +82,7 @@ async with ZepClient(api_key) as client: except NotFoundError: print("Sesssion not found") ``` + @@ -92,18 +90,19 @@ async with ZepClient(api_key) as client: const client: ZepClient = await ZepClient.init(api_key); try { - const messages: Message[] = await client.message.getSessionMessages(session_id); - messages.forEach((message: Message) => { - console.log(message); - }); + const messages: Message[] = await client.message.getSessionMessages(session_id); + messages.forEach((message: Message) => { + console.log(message); + }); } catch (error) { - if (error instanceof NotFoundError) { - console.log("Message not found"); - } else { - throw error; - } + if (error instanceof NotFoundError) { + console.log("Message not found"); + } else { + throw error; + } } ``` + @@ -134,7 +133,7 @@ try { You have the ability to modify the metadata of a message. Please provide the metadata in the following format. Note that at this time, it's not possible to update the content of a message itself. -```json +```json { "metadata": { "foo": "bar" @@ -160,6 +159,7 @@ async with ZepClient(api_key) as client: except NotFoundError: print("Session not found") ``` + @@ -167,14 +167,15 @@ async with ZepClient(api_key) as client: const client: ZepClient = await ZepClient.init(api_key); try { - const session_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc6"; // Replace with the actual session_id - const message_uuid: string = "3e0e4af9-71ff-4541-b206-6133574bbbc7"; // Replace with the actual message_id - const metadata: any = { metadata: { foo: "bar" } }; // Replace with the desired metadata - await client.message.updateSessionMessageMetadata(session_id, message_uuid, metadata); + const session_id: string = "3e0e4af9-71ff-4541-b206-6133574bbbc6"; // Replace with the actual session_id + const message_uuid: string = "3e0e4af9-71ff-4541-b206-6133574bbbc7"; // Replace with the actual message_id + const metadata: any = { metadata: { foo: "bar" } }; // Replace with the desired metadata + await client.message.updateSessionMessageMetadata(session_id, message_uuid, metadata); } catch (error) { - console.error("Session not found", error); + console.error("Session not found", error); } ``` + @@ -195,4 +196,3 @@ try { } } ``` - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/overview.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/overview.mdx index bb12665e4a..76377a725f 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/overview.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/overview.mdx @@ -15,17 +15,17 @@ Zep offers several approaches to populating prompts with context from historical ## Perpetual Memory Perpetual Memory is the default memory type. Salient facts from the dialog are extracted and stored in a `Fact Table`. This -is updated in real-time as new messages are added to the Session. +is updated in real-time as new messages are added to the Session. Every time you call the Memory API to get a Memory, Zep returns the Fact Table, the most recent messages (per your `Message Window` setting), and a summary of the most recent messages prior to the `Message Window`. -We've found that including the combination of the Fact Table, summary, and the most recent messages in a prompts provides both factual +We've found that including the combination of the Fact Table, summary, and the most recent messages in a prompts provides both factual context and nuance to the LLM. - Perpetual Memory + Perpetual Memory ## Summary Retriever Memory @@ -40,7 +40,8 @@ You don't need to do anything to enable this feature, beyond adding messages to calling the `get_memory` API and requesting the `perpetual` `memory_type`. -Want to learn more about how Summary Retriever works? [Read How Perpetual Memory Works](#how-summary-retriever-memory-works). + Want to learn more about how Summary Retriever works? [Read How Perpetual Memory + Works](#how-summary-retriever-memory-works). ## Message Window Buffer Memory @@ -60,7 +61,7 @@ This is ongoing, ensuring that the entire conversation is incrementally summariz These summaries are also embedded, enabling vector similarity search over the entire series of conversation summaries. - Summary Retriever Flow Chart + Summary Retriever Flow Chart Every time you call the Memory API to get a Memory, Zep uses a proprietary, low-latency language model to generate a @@ -74,4 +75,4 @@ low-latency summarization model. The resulting summary and most recent messages populating your prompt. The entire process takes hundreds of milliseconds, so that you're able to rapidly populate your prompt with relevant -context. \ No newline at end of file +context. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/search.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/search.mdx index d1997dff20..5f02afdef5 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/search.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/search.mdx @@ -30,6 +30,7 @@ of both. Memory search also supports querying by message creation date. Read more about [constructing search queries](/working-with-search#maximal-marginal-relevance-re-ranking). + @@ -60,32 +61,33 @@ for search_result in search_results: # print(search_result.messsage.dict()) print(search_result.summary.dict()) ``` + ```typescript -import { MemorySearchPayload, ZepClient } from '@getzep/zep-js'; - +import { MemorySearchPayload, ZepClient } from "@getzep/zep-js"; // This uniquely identifies the user's session const session_id: string = "my_session_id"; // Initialize the Zep client before running this code const search_payload: MemorySearchPayload = { - text: "Is Lauren Olamina a character in a book?", - search_scope: "summary", // This could be messages or summary - search_type: "mmr", // Remove this if you'd prefer not to rerank results - mmr_lambda: 0.5, // Tune diversity vs relevance + text: "Is Lauren Olamina a character in a book?", + search_scope: "summary", // This could be messages or summary + search_type: "mmr", // Remove this if you'd prefer not to rerank results + mmr_lambda: 0.5, // Tune diversity vs relevance }; const search_results = await client.memory.searchMemory(session_id, search_payload); search_results.forEach((search_result) => { - // Uncomment for message search - // console.log(search_result.message); - console.log(search_result.summary); + // Uncomment for message search + // console.log(search_result.message); + console.log(search_result.summary); }); ``` + @@ -121,25 +123,22 @@ zep_client.memory.search_memory( ), ) ``` + ```typescript -await client.memory.searchMemory( - session_id, - { - query: "I enjoy reading science fiction.", - metadata: { - where: { jsonpath: '$[*] ? (@.foo == "bar")' }, - }, - } -); +await client.memory.searchMemory(session_id, { + query: "I enjoy reading science fiction.", + metadata: { + where: { jsonpath: '$[*] ? (@.foo == "bar")' }, + }, +}); ``` + - - ```json { "dist": 0.7170433826192629, @@ -193,5 +192,5 @@ Zep can return all messages from a search up to a certain row limit. This limit Searching through chat histories can be tricky. Chat messages are often brief and might not carry much "information". When these short texts are turned into high-dimensional embedding vectors, the result can be very sparse vectors. This sparsity means a lot of these vectors end up being close to each other in the vector space, which can lead to a higher chance of getting false positives in your search results for relevant messages. As a result, we recommend searching over Summaries, which include more information than Messages. - + diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/sessions.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/sessions.mdx index dae919edd6..81e50a717b 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/sessions.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/sessions.mdx @@ -10,6 +10,7 @@ associated with it. The `SessionID` is a string key that accepts arbitrary identifiers. Related data you'd like to store can be persisted as metadata. + ## Adding a Session @@ -23,34 +24,37 @@ conversation a user might have with your app Sessions are created automatically when adding Memories. If the SessionID already exists, then the Memory is upserted into the Session. Manually creating a session can be useful if you want to associate it with a user or add metadata. + -```python +```python async with ZepClient(api_key=api_key) as client: session_id = uuid.uuid4().hex # A new session identifier session = Session( - session_id=session_id, + session_id=session_id, user_id=user_id, # Optionally associate this session with a user metadata={"foo" : "bar"} ) await client.memory.aadd_session(session) ``` + -```typescript +```typescript const client: ZepClient = await ZepClient.init(api_key); const session_id: string = uuid.v4(); // Generate a new session identifier const session: Session = new Session({ - session_id, - user_id: user.user_id, // Optionally associate this session with a user - metadata: { "foo": "bar" }, + session_id, + user_id: user.user_id, // Optionally associate this session with a user + metadata: { foo: "bar" }, }); await client.memory.addSession(session); ``` + @@ -60,6 +64,7 @@ await client.memory.addSession(session); You can update a session's metadata by providing a Session object with new metadata. Note that metadata is merged, so any existing metadata will be preserved. + @@ -74,8 +79,8 @@ await client.memory.aupdate_session(session) ```typescript const session: Session = new Session({ - session_id, - metadata: { "qax": "baz" }, + session_id, + metadata: { qax: "baz" }, }); await client.memory.updateSession(session); ``` @@ -84,6 +89,7 @@ await client.memory.updateSession(session); ## Getting a Session + @@ -92,6 +98,7 @@ await client.memory.updateSession(session); session = await client.memory.aget_session(session_id) print(session.dict()) ``` + @@ -99,11 +106,10 @@ print(session.dict()) const session = await client.memory.getSession(session_id); console.log(session); ``` + - - ## Deleting a Session Deleting a Session soft-deletes the Session and all associated Memories. The Session and Memories are still available in @@ -120,17 +126,17 @@ Soft-deleted data is hard-deleted periodically. ```python await client.memory.adelete_memory(session_id) ``` + ```typescript -await client.memory.deleteMemory(session_id) +await client.memory.deleteMemory(session_id); ``` + - - ## Listing Sessions You can list all Sessions in the Zep Memory Store with optional limit and cursor parameters for pagination. We also @@ -152,6 +158,7 @@ for session_chunk in all_sessions: for session in session_chunk: print(session) ``` + @@ -159,15 +166,15 @@ for session_chunk in all_sessions: // List the first 10 Sessions const sessions: Session[] = await client.memory.listSessions(10, 0); console.log("First 10 Sessions:"); -sessions.forEach(session => console.log(session)); +sessions.forEach((session) => console.log(session)); // List All Sessions using a generator console.log("All Sessions:"); const allSessionsGenerator = client.memory.listSessionsChunked(100); for await (const sessionChunk of allSessionsGenerator) { - sessionChunk.forEach(session => console.log(session)); + sessionChunk.forEach((session) => console.log(session)); } ``` + - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/summaries.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/summaries.mdx index 1f104e9fea..e0d95937ed 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/summaries.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/chat-history-memory/summaries.mdx @@ -7,17 +7,16 @@ configured `Message Window` for your [Zep Project](/getting-started/projects). The first summary is generated after the first `N` messages are added to a Session. - - **Summaries are generated asynchronously.** Zep uses a proprietary, low-latency summarization model to generate dialog summaries asynchronously. This means that summary generation does not delay your requests to retrieve Memories from Zep. + - List of Summaries + List of Summaries ## Accessing Summaries @@ -34,5 +33,3 @@ search and includes this summary in your Memory request. Zep automatically determines which summary to add to a response based on your configured `Message Window` and the number of messages in the Session. - - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/dialog-classification.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/dialog-classification.mdx index 17c375c757..4587468446 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/dialog-classification.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/dialog-classification.mdx @@ -5,55 +5,40 @@ slug: dialog-classification -Zep enables you to classify Sessions into various categories and save these classifications in the Session's metadata. -This feature is handy for directing Sessions to appropriate agents or for monitoring the kinds of interactions users have with your Assistant. -Classifications are processed in just a few hundred milliseconds, allowing them to run synchronously with the chat loop. + Zep enables you to classify Sessions into various categories and save these classifications in the Session's metadata. + This feature is handy for directing Sessions to appropriate agents or for monitoring the kinds of interactions users + have with your Assistant. Classifications are processed in just a few hundred milliseconds, allowing them to run + synchronously with the chat loop. ## Classifying Sessions -A classification task consists of a topic and a list of classes. -The `topic` is the type of classification you want to perform, and the `classes` are the possible categories you want to classify the Session into. +A classification task consists of a topic and a list of classes. +The `topic` is the type of classification you want to perform, and the `classes` are the possible categories you want to classify the Session into. The `topic` is only used as a name or label for the classification task and does not affect the classification itself. -You may optionally specify the number of previous messages to consider when classifying the Session (default `4`), and whether to persist the classification in the Session's metadata (default `True`). +You may optionally specify the number of previous messages to consider when classifying the Session (default `4`), and whether to persist the classification in the Session's metadata (default `True`). - - ```python - classes = ["class1", "class2", ..., "other"] - classification = client.memory.classify_session( - session_id, - "topic", - classes, - last_n=4, - persist=True - ) - ``` - - - ```typescript - const classes = ["class1", "class2", ..., "other"] - const classification = await client.memory.classifySession( - session_id, - "topic", - classes, - 4, // lastN - true // persist - ) - ``` - + + ```python classes = ["class1", "class2", ..., "other"] classification = client.memory.classify_session( session_id, + "topic", classes, last_n=4, persist=True ) ``` + + + ```typescript const classes = ["class1", "class2", ..., "other"] const classification = await + client.memory.classifySession( session_id, "topic", classes, 4, // lastN true // persist ) ``` + The returned result will be one of the classes you provided, or "other" if none of the classes are a good fit. The classification result is also stored in the Session's metadata if `persist` is `True`. ```json -{"system":{"classes":{"topic":"travel"}}} +{ "system": { "classes": { "topic": "travel" } } } ``` And Sessions viewed in the Zep app will be labeled with the classification result. - Classifier Metadata Image + Classifier Metadata Image ### Adding Custom Instruction @@ -61,33 +46,20 @@ And Sessions viewed in the Zep app will be labeled with the classification resul You may optionally provide a custom instruction to the classification task. This instruction will be injected into the Dialog Classification Prompt. You may want to use this option if you have specific guidelines that you want to communicate to the LLM in addition to our classification prompt. + - - ```python - classes = ["advanced", "beginner", ..., "dojo"] - classification = client.memory.classify_session( - session_id, - "experience level", - classes, - instruction="Classify the user's experience level. You may classify experience as 'dojo' only if the user is a black belt." - ) - ``` - - - ```typescript - const classes = ["advanced", "beginner", ..., "dojo"] - const classification = await client.memory.classifySession( - session_id, - "experience level", - classes, - "Classify the user's experience level. You may classify experience as 'dojo' only if the user is a black belt." - ) - ``` - + + ```python classes = ["advanced", "beginner", ..., "dojo"] classification = client.memory.classify_session( + session_id, "experience level", classes, instruction="Classify the user's experience level. You may classify + experience as 'dojo' only if the user is a black belt." ) ``` + + + ```typescript const classes = ["advanced", "beginner", ..., "dojo"] const classification = await + client.memory.classifySession( session_id, "experience level", classes, "Classify the user's experience level. You + may classify experience as 'dojo' only if the user is a black belt." ) ``` + - - ### Building a Semantic Router with User Intent Zep's Session Classifier can be used to build a semantic router that routes user sessions to different agents or chains based on the user's intent. @@ -120,13 +92,15 @@ user: Hello, my phone isn't responding to touch. "has payment question", "other" ] + const classification = await client.memory.classifySession( - session_id, "intent", classes - ) +session_id, "intent", classes +) console.log(classification.class) ``` + ```Text "needs support" @@ -134,44 +108,29 @@ const classification = await client.memory.classifySession( ### A High-Performance Tool Picker -Using an agent to pick tools can often be slow and inaccurate. Zep's Session Classifier allows you to pick tools at very low latency +Using an agent to pick tools can often be slow and inaccurate. Zep's Session Classifier allows you to pick tools at very low latency and high accuracy. You may then instruct an LLM to use the selected tool and provided Session information. ```Text user: What is the capital of France? ``` + - - ```python - classes = [ - "complete math problems using a calculator", - "research topics or find information with a web search", - "no matching tool", - ] - classification = client.memory.classify_session( - session_id, "tool", classes - ) - ``` - - - ```typescript - const classes = [ - "complete math problems using a calculator", - "research topics or find information with a web search", - "no matching tool", - ] - const classification = await client.memory.classifySession( - session_id, "tool", classes - ) - ``` - + + ```python classes = [ "complete math problems using a calculator", "research topics or find information with a web + search", "no matching tool", ] classification = client.memory.classify_session( session_id, "tool", classes ) ``` + + + ```typescript const classes = [ "complete math problems using a calculator", "research topics or find information + with a web search", "no matching tool", ] const classification = await client.memory.classifySession( session_id, + "tool", classes ) ``` + ```Text "research topics or find information with a web search" ``` - ### Classifying Emotions Zep's Session Classifier can be used to classify user emotions and store these classifications in the Session's metadata. @@ -180,39 +139,16 @@ Zep's Session Classifier can be used to classify user emotions and store these c AI: We're unfortunately going to reschedule your appointment. user: Is that entirely necessary? I'm very busy. ``` + - - ```python - classes = [ - "happy", - "sad", - "frustrated", - "angry", - "other" - ] - classification = client.memory.classify_session( - session_id, - "emotion", - classes - ) - ``` - - - ```typescript - const classes = [ - "happy", - "sad", - "frustrated", - "angry", - "other" - ] - classification = await client.memory.classifySession( - session_id, - "emotion", - classes - ) - ``` - + + ```python classes = [ "happy", "sad", "frustrated", "angry", "other" ] classification = + client.memory.classify_session( session_id, "emotion", classes ) ``` + + + ```typescript const classes = [ "happy", "sad", "frustrated", "angry", "other" ] classification = await + client.memory.classifySession( session_id, "emotion", classes ) ``` + ```Text @@ -227,8 +163,8 @@ Zep supports executing multiple classification tasks against a Session, allowing { "system": { "classes": { - "topic": "travel", - "intent": "needs support", + "topic": "travel", + "intent": "needs support", "emotion": "frustrated" } } @@ -241,4 +177,4 @@ Zep supports executing multiple classification tasks against a Session, allowing 2. **Ensure your classes are well separated**: If your classes are too similar, the classifier will have a hard time distinguishing between them. 3. **Provide a "none", "other", or "unknown" class**: If none of the classes are a good fit, the classifier should be able to select an option that indicates this. 4. **Limit the number of previous messages**: The more messages you consider, the longer the classification will take. Additionally, the context may change through the conversation. Recommendation: no more than the prior 4 to 6 messages. -5. **Persist the classification**: If you want to use the classification result in the future, you should persist the classification in the Session's metadata. This is the default. \ No newline at end of file +5. **Persist the classification**: If you want to use the classification result in the future, you should persist the classification in the Session's metadata. This is the default. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/document-collections.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/document-collections.mdx index 43e6991c8f..10a24ca04d 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/document-collections.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/document-collections.mdx @@ -3,6 +3,7 @@ title: Document Collections slug: document-collections --- + Zep's document vector store lets you embed and search documents using vector similarity search, Maximum Marginal Relevance Re-Ranking, and metadata filtering. You can manage collections, ingest documents, and search using _Zep's SDKs_, _LangChain_, or _LlamaIndex_. @@ -13,17 +14,18 @@ You can manage collections, ingest documents, and search using _Zep's SDKs_, _La All methods come in sync and async flavors, with async methods prefixed with `a`. For instance, `zep-python` offers both `zep_client.memory.add_memory` and `zep_client.memory.aadd_memory`. + ## Key Concepts ### Collections -A `Collection` is a group of documents that use the same embedding strategy and model. *Zep automatically creates embeddings* for the documents you provide. +A `Collection` is a group of documents that use the same embedding strategy and model. _Zep automatically creates embeddings_ for the documents you provide. ### Documents -`Documents` are the texts you want to embed and search. You can add documents to collections and optionally assign them a unique ID and metadata. *If you add metadata, it can help filter search results.* +`Documents` are the texts you want to embed and search. You can add documents to collections and optionally assign them a unique ID and metadata. _If you add metadata, it can help filter search results._ ## Initializing the Zep Client @@ -57,9 +59,9 @@ const client = await ZepClient.init("zep_api_key"); const collection_name: string = "babbagedocs"; // The name of your collection. Alphanumeric values only const collection = await client.document.addCollection({ - name: collection_name, // Required - description: "Babbage's Calculating Engine", // Optional - metadata: { "foo": "bar" } // Optional metadata to associate with this collection + name: collection_name, // Required + description: "Babbage's Calculating Engine", // Optional + metadata: { foo: "bar" }, // Optional metadata to associate with this collection }); ``` @@ -82,14 +84,13 @@ collection = client.document.get_collection(collection_name) ```typescript -const collection = await client.document.getCollection(collection_name) +const collection = await client.document.getCollection(collection_name); ``` - ## Adding Documents to a Collection @@ -125,11 +126,11 @@ When you use `collection.add_documents`, it returns a list of Zep UUIDs correspo const chunks: string[] = read_chunks_from_file(file, max_chunk_size); // Your custom function to read chunks from a file const documents: Document[] = chunks.map((chunk, index) => { - return new Document({ - content: chunk, - documentId: `${collection_name}-${index}`, // Optional document ID - metadata: { "bar": index }, // Optional metadata - }); + return new Document({ + content: chunk, + documentId: `${collection_name}-${index}`, // Optional document ID + metadata: { bar: index }, // Optional metadata + }); }); const uuids: string[] = await client.document.addDocuments(collection_name, documents); @@ -143,12 +144,12 @@ When you use `collection.addDocuments`, it returns a list of Zep UUIDs correspon - Zep's document vector store has VectorStore support for Langchain. **Python Example:** + ```python from langchain.docstore.base import Document from langchain.text_splitter import RecursiveCharacterTextSplitter @@ -165,20 +166,22 @@ text_splitter = RecursiveCharacterTextSplitter( docs = text_splitter.create_documents([raw_text]) uuids = vectorstore.add_documents(docs) ``` + **Typescript Example:** + ```typescript import { ZepClient } from "@getzep/zep-js"; import { ZepVectorStore } from "@getzep/zep-js/langchain"; import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; const vectorStore = await ZepVectorStore.init({ - client: zepClient, - collectionName: "", + client: zepClient, + collectionName: "", }); const text_splitter = new RecursiveCharacterTextSplitter({ - chunkSize: 400, - chunkOverlap: 50, - lengthFunction: (text: string) => text.length, // Assuming lengthFunction accepts a function that returns the length of the text + chunkSize: 400, + chunkOverlap: 50, + lengthFunction: (text: string) => text.length, // Assuming lengthFunction accepts a function that returns the length of the text }); const docs = await text_splitter.createDocuments([raw_text]); @@ -189,7 +192,6 @@ const uuids = await vectorstore.addDocuments(docs); - ### Chunking your documents Choosing the right _chunking strategy_ is crucial and highly dependent on your specific needs. A variety of 3rd-party libraries, including Langchain, offer support for processing documents from numerous sources and dividing them into smaller segments suitable for embedding. @@ -224,12 +226,12 @@ while True: ```typescript while (true) { - const collection = await client.document.getCollection(collectionName); - console.log(`Embedding status: ${c.document_embedded_count}/${c.document_count} documents embedded`); - await sleep(1000); // Sleep for 1 second (1000 milliseconds) - if (collection.status === "ready") { - break; - } + const collection = await client.document.getCollection(collectionName); + console.log(`Embedding status: ${c.document_embedded_count}/${c.document_count} documents embedded`); + await sleep(1000); // Sleep for 1 second (1000 milliseconds) + if (collection.status === "ready") { + break; + } } ``` @@ -237,7 +239,6 @@ while (true) { - Once the collection's status changes to `ready`, it means all documents have been successfully embedded and are now searchable. ## Searching a Collection with Hybrid Vector Search @@ -250,6 +251,7 @@ You can initiate a search using either a text query or an embedding vector, depe Zep's Collection and Memory search support semantic search queries, JSONPath-based metadata filters, and a combination of both. Memory search also supports querying by message creation date. Read more about [constructing search queries](working-with-search.mdx). + @@ -288,13 +290,13 @@ let results = await collection.search({ text: query, limit: 5 }); // Hybrid search for documents using a query string and metadata filter const metadataQuery = { - where: { jsonpath: '$[*] ? (@.baz == "qux")' } + where: { jsonpath: '$[*] ? (@.baz == "qux")' }, }; results = await collection.search({ text: query, metadata: metadataQuery, limit: 5 }); // Search by embedding vector, rather than text query // embedding is a list of floats -results = await collection.search({ embedding: embedding, limit: 5}); +results = await collection.search({ embedding: embedding, limit: 5 }); ``` `metadata` is an optional dictionary of [JSONPath filters](https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html) used to match on metadata associated with your documents. @@ -303,7 +305,6 @@ results = await collection.search({ embedding: embedding, limit: 5}); - **Python Example:** @@ -333,7 +334,7 @@ const resultsMMR = await vectorstore.search(query, { searchType: "mmr", k: 5 }); console.log(resultsMMR); ``` -*You can also use `ZepVectoreStore` as a retriever with langchain* +_You can also use `ZepVectoreStore` as a retriever with langchain_ Python example @@ -357,28 +358,22 @@ Typescript example const retriever = vectorStore.asRetriever(); const setupAndRetrieval = RunnableMap.from({ - context: new RunnableLambda({ - func: (input: string) => - retriever.invoke(input).then(combineDocuments), - }), - question: new RunnablePassthrough(), + context: new RunnableLambda({ + func: (input: string) => retriever.invoke(input).then(combineDocuments), + }), + question: new RunnablePassthrough(), }); const outputParser = new StringOutputParser(); -const chain = setupAndRetrieval - .pipe(prompt) - .pipe(model) - .pipe(outputParser) +const chain = setupAndRetrieval.pipe(prompt).pipe(model).pipe(outputParser); ``` -> *Please check the complete typescript [rag vector store chain example](https://github.com/getzep/zep-js/blob/main/examples/langchain/vector_store_example.ts)* - +> _Please check the complete typescript [rag vector store chain example](https://github.com/getzep/zep-js/blob/main/examples/langchain/vector_store_example.ts)_ - ## Retrieving Documents by UUID Zep supports retrieving a list of documents by Zep UUID: @@ -427,10 +422,10 @@ client.document.update_collection( ```typescript -await client.document.updateCollection( - collectionName, - { description: "Charles Babbage's Babbage's Calculating Engine 2", metadata: { newfoo: "newbar" } } -); +await client.document.updateCollection(collectionName, { + description: "Charles Babbage's Babbage's Calculating Engine 2", + metadata: { newfoo: "newbar" }, +}); ``` @@ -456,7 +451,6 @@ await collection.updateDocument(documentUUID, { documentId: "new_id", metadata: - ### Deleting Documents @@ -476,15 +470,13 @@ collection.delete_document(document_uuid) ```typescript -await collection.deleteDocument(document_uuid) +await collection.deleteDocument(document_uuid); ``` - - ### Deleting a Collection Deleting a collection will delete all documents in the collection, as well as the collection itself. @@ -502,11 +494,9 @@ client.document.delete_collection(collection_name) ```typescript -await client.document.deleteCollection(collection_name) +await client.document.deleteCollection(collection_name); ``` - - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/chainlit.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/chainlit.mdx index cf606786a5..8cdff2eaf9 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/chainlit.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/chainlit.mdx @@ -8,15 +8,14 @@ slug: ecosystem/chainlit - You can follow Chainlit installation steps on their - Getting Started Page + You can follow Chainlit installation steps on their + Getting Started Page By integrating Zep into your Chainlit LLM application, you elevate your conversational agent with powerful features like long-term memory and context fusion. In this guide, we'll walk you through the steps to build a simple Question and Answer agent using Chainlit, Open AI and Zep. - ### Steps to Use Zep Cloud with ChainLit 1. **Setup Zep Client**: Initialize the Zep Client within your ChainLit application using your [Zep Project API key](https://help.getzep.com/projects). @@ -50,22 +49,23 @@ async def start_chat(): # Generate unique identifiers for the user and session. user_id = str(uuid.uuid4()) session_id = str(uuid.uuid4()) - + # Save user and session identifiers in the current session context. cl.user_session.set("user_id", user_id) cl.user_session.set("session_id", session_id) # Register a new user in Zep's system using the generated User ID. await zep.user.aadd(CreateUserRequest(user_id=user_id)) - + # Start a new session for the user in Zep. await zep.memory.aadd_session(Session(user_id=user_id, session_id=session_id)) ``` - 3. **Zep Dialog tools**: Elevate agent knowledge with ChainLit Steps and Zep Dialog Tools -Discover more about Zep's dialog tools on the Zep Documentation Page. - + + Discover more about Zep's dialog tools on the{" "} + Zep Documentation Page. + ```python @cl.step(name="session classification", type="tool") @@ -85,12 +85,12 @@ async def classify_session(session_id: str): return classification ``` - - 4. **Message Handling**: You can effectively store and fetch your Chainlit application chat history on Zep memory store, enhancing your LLM conversational context. -Discover more about Zep's memory store capabilities on the Zep Documentation Page. - + + Discover more about Zep's memory store capabilities on the{" "} + Zep Documentation Page. + ```python @@ -100,10 +100,10 @@ async def call_openai(session_id): # Fetch session messages from Zep. memory = await zep.message.aget_session_messages(session_id) memory_history = [m.to_dict() for m in memory] - + # Prepare data, excluding certain fields for privacy/security. cleaned_data = [{k: v for k, v in item.items() if k not in ['created_at', 'role_type', 'token_count', 'uuid']} for item in memory_history] - + # Generate a response from OpenAI using the cleaned session data. response = await openai_client.chat.completions.create( model="gpt-4", @@ -138,13 +138,10 @@ async def on_message(message: cl.Message): ) ``` -5. To access your LLM session data, navigate to the Zep Cloud Console, select a session, and review all the associated session data and logs. -Zep Cloud session console example +5. To access your LLM session data, navigate to the Zep Cloud Console, select a session, and review all the associated session data and logs. +Zep Cloud session console example In conclusion, integrating Zep Cloud with Chainlit empowers developers to create conversational AI applications that are more intelligent, context-aware, and efficient. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/flowise.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/flowise.mdx index 3a6e837295..552548ce66 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/flowise.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/ecosystem/flowise.mdx @@ -8,8 +8,8 @@ slug: ecosystem/flowise - You can follow Flowise installation steps on their - Getting Started Page + You can follow Flowise installation steps on their + Getting Started Page ## Using Zep Cloud Nodes @@ -17,35 +17,30 @@ slug: ecosystem/flowise Once you have Flowise app up and running, you can use Zep Cloud nodes in your LLM apps. We expose the following nodes: -* `Zep Memory - Cloud` - wrapper around Zep Memory API. You can use this node to add Long-Term memory to your app. -Learn more about [Zep Memory](/chat-history-memory) + +- `Zep Memory - Cloud` - wrapper around Zep Memory API. You can use this node to add Long-Term memory to your app. + Learn more about [Zep Memory](/chat-history-memory) In order to use this node, you will need to have a Zep Project API key and add it as a Connect Credential in your Flowise app. -Zep Cloud Memory Flowise Node + +Zep Cloud Memory Flowise Node A complete chain using Zep Memory Node, may look like this: Zep Cloud Memory Flowise Node Complete Example -* `Zep Collection - Cloud` - wrapper around Zep’s document vector store. It lets you embed and search documents. You can use this node to add RAG capabilities to your app. -Learn more about [Zep Collections](../document-collections.mdx) +- `Zep Collection - Cloud` - wrapper around Zep’s document vector store. It lets you embed and search documents. You can use this node to add RAG capabilities to your app. + Learn more about [Zep Collections](../document-collections.mdx) In order to use this node, you will need to have a Zep Project API key and add it as a Connect Credential in your Flowise app. You will also need to provide the collection name for your Zep Collection. -Zep Cloud Collection Flowise Node + +Zep Cloud Collection Flowise Node A complete chain using Zep Collection Node, may look like this: @@ -56,9 +51,7 @@ A complete chain using Zep Collection Node, may look like this: We are using **Zep Collection Node** as a retriever passed into **Conversational Retrieval QA Chain**. This example also illustrates how you can use **Zep Memory** in combination with **Zep Collection**. + -Zep Cloud Collection Flowise Node Complete Example \ No newline at end of file +Zep Cloud Collection Flowise Node Complete Example diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/faq.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/faq.mdx index 4b17b86f0a..5154b5467e 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/faq.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/faq.mdx @@ -12,6 +12,7 @@ slug: faq Expression Language (LCEL) project. Please use the classes available in the Cloud SDKs and not in the LangChain SDKs. + Not yet - we are working on adding support for LlamaIndex. @@ -20,6 +21,7 @@ slug: faq Yes, you can use `Zep Memory - Cloud` and `Zep Collection - Cloud` nodes in the latest Flowise release. You can learn more in our [Flowise Ecosystem section](ecosystem/flowise.mdx). + @@ -27,6 +29,7 @@ slug: faq We've also removed the Named Entity Recognition (NER) feature. We are in the process of replacing NER with a more powerful and flexible Structured Data Extractor. + The API URL for Zep Cloud is `https://api.getzep.com`. Note that you do not need to specify the API URL when using the Cloud SDKs. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/getting-support.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/getting-support.mdx index f34dc7290c..a5122a1198 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/getting-support.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/getting-support.mdx @@ -4,4 +4,4 @@ slug: getting-support # Getting Support -Use the in-app chat to get help from the Zep team. You may also email us at [success@getzep.com](mailto:success@getzep.com). \ No newline at end of file +Use the in-app chat to get help from the Zep team. You may also email us at [success@getzep.com](mailto:success@getzep.com). diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/messagehistory-example.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/messagehistory-example.mdx index c8fe58979c..f3beb9fdc3 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/messagehistory-example.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/messagehistory-example.mdx @@ -3,7 +3,8 @@ title: MessageHistory Example slug: langchain/examples/messagehistory-example --- -The Zep Python SDK includes the `ZepChatMessageHistory` class, compatible with [LangChain Expression Language (LCEL)](https://python.langchain.com/docs/expression_language/get_started). + +The Zep Python SDK includes the `ZepChatMessageHistory` class, compatible with [LangChain Expression Language (LCEL)](https://python.langchain.com/docs/expression_language/get_started). This guide will walk you through creating a [MessageHistory](/chat-history-memory) chain using Zep's conversation history. @@ -15,6 +16,7 @@ This guide will walk you through creating a [MessageHistory](/chat-history-memor `ZEP_API_KEY` - API key to your zep project `OPENAI_API_KEY` - Open AI api key which the chain will require to generate the answer + @@ -26,6 +28,7 @@ This guide will walk you through creating a [MessageHistory](/chat-history-memor Alternatively, you can create a collection by running either [Document example](https://github.com/getzep/zep-python/blob/main/examples/documents/documents_async.py) in python sdk repository or [Document example](https://github.com/getzep/zep-js/blob/main/examples/documents/index.ts) in typescript sdk repository. + @@ -34,6 +37,7 @@ This guide will walk you through creating a [MessageHistory](/chat-history-memor You can create a session by running either [Memory example](https://github.com/getzep/zep-python/blob/main/examples/chat_history/memory_async.py) in python sdk repository or [Memory example](https://github.com/getzep/zep-js/blob/main/examples/memory/memory_example.ts) in typescript sdk repository. + **Initialize ZepClient with necessary imports** @@ -62,6 +66,7 @@ zep = ZepClient( api_key=ZEP_API_KEY, ) ``` + @@ -70,18 +75,15 @@ zep = ZepClient( import { ZepClient } from "@getzep/zep-js"; import { ZepChatMessageHistory } from "@getzep/zep-js/langchain"; import { ChatOpenAI } from "@langchain/openai"; -import { - ChatPromptTemplate, - MessagesPlaceholder, -} from "@langchain/core/prompts"; +import { ChatPromptTemplate, MessagesPlaceholder } from "@langchain/core/prompts"; import { RunnableWithMessageHistory } from "@langchain/core/runnables"; const zepClient = await ZepClient.init(process.env.ZEP_API_KEY); ``` + - @@ -97,16 +99,18 @@ answer_prompt = ChatPromptTemplate.from_messages( ] ) ``` + ```typescript const prompt = ChatPromptTemplate.fromMessages([ - ["system", "Answer the user's question below. Be polite and helpful:"], - new MessagesPlaceholder("history"), - ["human", "{question}"], + ["system", "Answer the user's question below. Be polite and helpful:"], + new MessagesPlaceholder("history"), + ["human", "{question}"], ]); ``` + @@ -118,11 +122,11 @@ const prompt = ChatPromptTemplate.fromMessages([ This will incorporate the chat history into the prompt. It's **important** that this variable name aligns with the `history_messages_key` in the `RunnableWithMessageHistory` chain for seamless integration. + **`question` must match `input_messages_key` in `RunnableWithMessageHistory`` chain.** - **Compose the final chain** @@ -148,34 +152,36 @@ chain = RunnableWithMessageHistory( history_messages_key="chat_history", ) ``` + ```typescript const chain = prompt.pipe( - new ChatOpenAI({ - temperature: 0.8, - modelName: "gpt-3.5-turbo-1106", - }), + new ChatOpenAI({ + temperature: 0.8, + modelName: "gpt-3.5-turbo-1106", + }), ); const chainWithHistory = new RunnableWithMessageHistory({ - runnable: chain, - getMessageHistory: (sessionId) => - new ZepChatMessageHistory({ - client: zepClient, - sessionId: sessionId, - memoryType: "perpetual", - }), - inputMessagesKey: "question", - historyMessagesKey: "history", + runnable: chain, + getMessageHistory: (sessionId) => + new ZepChatMessageHistory({ + client: zepClient, + sessionId: sessionId, + memoryType: "perpetual", + }), + inputMessagesKey: "question", + historyMessagesKey: "history", }); ``` + - Here's a quick overview of what's happening: + 1. We use `RunnableWithMessageHistory` to incorporate [Zep's Chat History](/chat-history-memory) into our chain. 2. This class requires a `session_id` as a parameter when you activate the chain. 3. To manually invoke this chain, provide the `session_id` as a parameter and the `question` as an input to the chain. @@ -190,25 +196,26 @@ chain_with_history.invoke( config={"configurable": {"session_id": "-"}}, ) ``` + ```typescript await chainWithHistory.invoke( - { - question: "-", - }, - { - configurable: { - sessionId: "-", - }, + { + question: "-", + }, + { + configurable: { + sessionId: "-", }, + }, ); ``` + - First, we initialize `ZepChatMessageHistory` with the following parameters: 1. `session_id` - This uniquely identifies the conversation within Zep. @@ -231,6 +238,7 @@ This chain can also be executed as part of our LangServe sample project. To do t For this you will need to: Clone our [Python SDK](https://github.com/getzep/zep-python) + ```bash git clone https://github.com/getzep/zep-python cd examples/langchain-langserve diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/rag-message-history-example.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/rag-message-history-example.mdx index c1f022f4cd..ffc2765a94 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/rag-message-history-example.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/rag-message-history-example.mdx @@ -4,10 +4,7 @@ slug: langchain/examples/rag-message-history-example --- - - **You can generate a Project API Key in [Zep Dashboard](https://app.getzep.com/projects).** - - +**You can generate a Project API Key in [Zep Dashboard](https://app.getzep.com/projects).** Make sure you have the following environment variables specified when running these examples: @@ -15,6 +12,7 @@ slug: langchain/examples/rag-message-history-example `ZEP_API_KEY` - API key to your zep project `OPENAI_API_KEY` - Open AI api key which the chain will require to generate the answer + @@ -23,6 +21,7 @@ slug: langchain/examples/rag-message-history-example You can create a session by running either [Memory example](https://github.com/getzep/zep-python/blob/main/examples/chat_history/memory_async.py) in python sdk repository or [Memory example](https://github.com/getzep/zep-js/blob/main/examples/memory/memory_example.ts) in typescript sdk repository. + You can find a complete RAG + Message History examples in the SDK examples diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/vectorstore-example.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/vectorstore-example.mdx index 11cd2f1232..084e887d0c 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/vectorstore-example.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/examples/vectorstore-example.mdx @@ -3,13 +3,12 @@ title: VectorStore Example slug: langchain/examples/vectorstore-example --- + Zep Python SDK ships with `ZepVectorStore` class which can be used with [LangChain Expression Language (LCEL)](https://python.langchain.com/docs/expression_language/get_started) Let's explore how to create a RAG chain using the `ZepVectorStore` for semantic search. - - **You can generate a project api key in [Zep Dashboard](https://app.getzep.com/projects).** - +**You can generate a project api key in [Zep Dashboard](https://app.getzep.com/projects).** Before diving into these examples, please ensure you've set the following environment variables: @@ -17,6 +16,7 @@ Let's explore how to create a RAG chain using the `ZepVectorStore` for semantic `ZEP_API_KEY` - API key to your zep project `OPENAI_API_KEY` - Open AI api key which the chain will require to generate the answer + @@ -28,8 +28,8 @@ Let's explore how to create a RAG chain using the `ZepVectorStore` for semantic Alternatively, you can create a collection by running either [Document example](https://github.com/getzep/zep-python/blob/main/examples/documents/documents_async.py) in python sdk repository or [Document example](https://github.com/getzep/zep-js/blob/main/examples/documents/index.ts) in typescript sdk repository. - + @@ -39,6 +39,7 @@ Let's explore how to create a RAG chain using the `ZepVectorStore` for semantic ZEP_API_KEY = os.environ.get("ZEP_API_KEY") ZEP_COLLECTION_NAME = os.environ.get("ZEP_COLLECTION") ``` + @@ -46,14 +47,14 @@ ZEP_COLLECTION_NAME = os.environ.get("ZEP_COLLECTION") const ZEP_API_KEY = process.env.ZEP_API_KEY; const ZEP_COLLECTION_NAME = process.env.ZEP_COLLECTION; ``` + - - **Need a project API key? Create one from the [Zep Dashboard](https://app.getzep.com/projects).** - +**Need a project API key? Create one from the [Zep Dashboard](https://app.getzep.com/projects).** Initialize ZepClient with necessary imports + @@ -82,36 +83,28 @@ zep = ZepClient( api_key=ZEP_API_KEY, ) ``` + ```typescript import { ZepClient } from "@getep/zep-js"; import { ChatOpenAI } from "@langchain/openai"; -import { - BasePromptTemplate, - ChatPromptTemplate, - PromptTemplate, -} from "@langchain/core/prompts"; +import { BasePromptTemplate, ChatPromptTemplate, PromptTemplate } from "@langchain/core/prompts"; import { ZepVectorStore, formatDocument } from "@getep/zep-js/langchain"; import { Document } from "@langchain/core/documents"; -import { - RunnableMap, - RunnableLambda, - RunnablePassthrough, -} from "@langchain/core/runnables"; +import { RunnableMap, RunnableLambda, RunnablePassthrough } from "@langchain/core/runnables"; import { StringOutputParser } from "@langchain/core/output_parsers"; import { ConsoleCallbackHandler } from "@langchain/core/tracers/console"; - -const zepClient = await ZepClient.init( - ZEP_API_KEY, -); +const zepClient = await ZepClient.init(ZEP_API_KEY); ``` + Initialize ZepVectorStore + @@ -122,19 +115,22 @@ vectorstore = ZepVectorStore( zep_client=zep, ) ``` + ```typescript const vectorStore = await ZepVectorStore.init({ - client: zepClient, - collectionName: ZEP_COLLECTION_NAME, + client: zepClient, + collectionName: ZEP_COLLECTION_NAME, }); ``` + Let's set up the retriever. We'll use `vectorstore` for this purpose and configure it to use [MMR](Search.md) search result reranking. + @@ -142,17 +138,20 @@ Let's set up the retriever. We'll use `vectorstore` for this purpose and configu ```python retriever = vectorstore.as_retriever() ``` + ```typescript - const retriever = vectorStore.asRetriever(); +const retriever = vectorStore.asRetriever(); ``` + Create a prompt template for synthesizing answers. + @@ -169,6 +168,7 @@ answer_prompt = ChatPromptTemplate.from_messages( ] ) ``` + @@ -185,11 +185,12 @@ const prompt = ChatPromptTemplate.fromMessages([ ], ]); ``` + - Create the default document prompt and define the helper function for merging documents. + @@ -205,6 +206,7 @@ def _combine_documents( doc_strings = [format_document(doc, document_prompt) for doc in docs] return document_separator.join(doc_strings) ``` + @@ -212,18 +214,19 @@ def _combine_documents( const DEFAULT_DOCUMENT_PROMPT = PromptTemplate.fromTemplate("{pageContent}"); async function combineDocuments( - docs: Document[], - documentPrompt: BasePromptTemplate = DEFAULT_DOCUMENT_PROMPT, - documentSeparator: string = "\n\n", + docs: Document[], + documentPrompt: BasePromptTemplate = DEFAULT_DOCUMENT_PROMPT, + documentSeparator: string = "\n\n", ) { - const docStrings: string[] = await Promise.all( - docs.map((doc) => { - return formatDocument(doc, documentPrompt); - }), - ); - return docStrings.join(documentSeparator); + const docStrings: string[] = await Promise.all( + docs.map((doc) => { + return formatDocument(doc, documentPrompt); + }), + ); + return docStrings.join(documentSeparator); } ``` + @@ -241,6 +244,7 @@ inputs = RunnableParallel( {"question": lambda x: x["question"], "context": retriever | _combine_documents}, ).with_types(input_type=UserInput) ``` + Define context retriever chain with output parser @@ -249,17 +253,18 @@ Define context retriever chain with output parser const outputParser = new StringOutputParser(); const setupAndRetrieval = RunnableMap.from({ - context: new RunnableLambda({ - func: (input: string) => - retriever.invoke(input).then(combineDocuments), - }), - question: new RunnablePassthrough(), + context: new RunnableLambda({ + func: (input: string) => retriever.invoke(input).then(combineDocuments), + }), + question: new RunnablePassthrough(), }); ``` + Compose final chain + @@ -267,18 +272,20 @@ Compose final chain ```python chain = inputs | answer_prompt | ChatOpenAI() | StrOutputParser() ``` + ```typescript const chain = setupAndRetrieval - .pipe(prompt) - .pipe(model) - .pipe(outputParser) - .withConfig({ - callbacks: [new ConsoleCallbackHandler()], - }); // Optional console callback handler if you want to see input and output of each step in the chain + .pipe(prompt) + .pipe(model) + .pipe(outputParser) + .withConfig({ + callbacks: [new ConsoleCallbackHandler()], + }); // Optional console callback handler if you want to see input and output of each step in the chain ``` + @@ -290,6 +297,7 @@ Here's a quick rundown of how the process works: 4. Finally, `StrOutputParser` extracts the LLM's result into a string. To invote this chain manually, simply pass the `question` into the chain's input. + @@ -299,16 +307,17 @@ chain_with_history.invoke( {"question": "-"}, ) ``` + ```typescript - const result = await chain.invoke("-"); // Pass the question as input +const result = await chain.invoke("-"); // Pass the question as input ``` + - ## Running the Chain with LangServe You can run this chain, along with others, using our LangServe sample project. @@ -316,6 +325,7 @@ You can run this chain, along with others, using our LangServe sample project. Here's what you'll need to do: Clone our [Python SDK](https://github.com/getzep/zep-python) + ```bash git clone https://github.com/getzep/zep-python cd examples/langchain-langserve @@ -324,4 +334,3 @@ cd examples/langchain-langserve Review the [README](https://github.com/getzep/zep-python/blob/main/examples/README.md) in the `langchain-langserve` directory for setup instructions. After firing up the server, head over to `http://localhost:8000/rag_vector_store/playground` to explore the LangServe playground using this chain. - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/messagehistory.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/messagehistory.mdx index 5eb5cc6c6f..17aac608cf 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/messagehistory.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/messagehistory.mdx @@ -3,8 +3,10 @@ title: ZepChatMessageHistory slug: langchain/messagehistory --- + - **You can find a complete [Message History Example](examples/messagehistory-example.mdx) that showcases how to use the `ZepChatMessageHistory` class in the chain.** + **You can find a complete [Message History Example](examples/messagehistory-example.mdx) that showcases how to use the + `ZepChatMessageHistory` class in the chain.** @@ -78,4 +80,4 @@ slug: langchain/messagehistory ``` - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/overview.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/overview.mdx index 46b6d0ec18..360d7544a8 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/overview.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/overview.mdx @@ -3,7 +3,9 @@ title: Overview slug: langchain/overview --- + Zep's [Python](https://github.com/getzep/zep-python) and [Typescript](https://github.com/getzep/zep-js) SDKs ship with [ZepVectorStore](vectorstore.mdx) and [ZepChatMessageHistory](messagehistory.mdx) classes that are compatible with Langchain's JS and Python Expression Languages. + ### Managing Chat History Memory Zep's `ZepChatMessageHistory` class can be used to provide long-term memory for your LangChain chat apps or agents. Zep will store the entire historical message stream, and automatically enrich chat sessions. @@ -28,4 +30,5 @@ See [Python and Typescript examples](examples/messagehistory-example.mdx) of how **Want to use `ZepChatMessageHistory` together with `ZepVectorStore`?** Please check our complete [Python and Typescript examples](examples/rag-message-history-example.mdx) + diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/vectorstore.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/vectorstore.mdx index 916456078b..1d5e0e1938 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/vectorstore.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/langchain/vectorstore.mdx @@ -3,8 +3,10 @@ title: ZepVectorStore slug: langchain/vectorstore --- + - **You can find a complete [Vector Store Example](examples/vectorstore-example.mdx) that showcases how to use the `ZepVectorStore` class in the chain.** + **You can find a complete [Vector Store Example](examples/vectorstore-example.mdx) that showcases how to use the + `ZepVectorStore` class in the chain.** @@ -81,4 +83,4 @@ slug: langchain/vectorstore - \ No newline at end of file + diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/privacy-policy.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/privacy-policy.mdx index 3484f65ff8..9089e23d54 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/privacy-policy.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/privacy-policy.mdx @@ -3,6 +3,7 @@ title: Privacy Policy slug: legal/privacy-policy --- + **Version 1.0** **Last revised on: January 27^th^, 2024** @@ -11,7 +12,7 @@ Zep Software, Inc. (the "Company") is committed to maintaining robust privacy protections for its users.  Our Privacy Policy ("Privacy Policy") is designed to help you understand how we collect, use and safeguard the information you provide to us and to assist you in making -informed decisions when using our Service.   +informed decisions when using our Service. For purposes of this Agreement, "Site" refers to the Company's website properties, which can be accessed at the getzep.com Internet domain. @@ -41,7 +42,7 @@ generated based on the data you submit and number of clicks. **Personal Information** includes your email and name which you submit to us through the registration process at the Site. -1.1. *Information collected via Technology* +1.1. _Information collected via Technology_ To activate the Service you do not need to submit any Personal Information other than your email address and name. To use the Service @@ -62,7 +63,7 @@ when utilizing our services, both on an individual and aggregate basis. For example, the Company may use cookies to collect the following information: -- how often you use our websites and services +- how often you use our websites and services - which content and features you use The Company may use both persistent and session cookies; persistent @@ -70,7 +71,7 @@ cookies remain on your computer after you close your session and until you delete them, while session cookies expire when you close your browser. -1.2. *Information you provide us by registering for an account* +1.2. _Information you provide us by registering for an account_ In addition to the information provided automatically by your browser when you visit the Site, to become a subscriber to the Service you will @@ -80,7 +81,7 @@ creating a user name and a password. By registering, you are authorizing us to collect, store and use your email address in accordance with this Privacy Policy. -1.3. *Children's Privacy* +1.3. _Children's Privacy_ The Site and the Service are not directed to anyone under the age of 13. The Site does not knowingly collect or solicit information from anyone @@ -93,7 +94,7 @@ info@getzep.com. 2. HOW WE USE AND SHARE INFORMATION -*Personal Information:* +_Personal Information:_ Except as otherwise stated in this Privacy Policy, we do not sell, trade, rent or otherwise share for marketing purposes your Personal @@ -118,7 +119,7 @@ security or technical concerns; or to protect against harm to the rights, property, or safety of our users or the public as required or permitted by law. -*Non-Personal Information* +_Non-Personal Information_ In general, we use Non-Personal Information to help us improve the Service and customize the user experience. We also aggregate @@ -154,7 +155,7 @@ and secure server software. By using our Service, you acknowledge that you understand and agree to assume these risks. 4. YOUR RIGHTS REGARDING THE USE OF YOUR PERSONAL -INFORMATION + INFORMATION You have the right at any time to prevent us from contacting you for marketing purposes.  When we send a promotional communication to a user, @@ -194,4 +195,4 @@ page for updates. 7. CONTACT US If you have any questions regarding this Privacy Policy or the practices -of this Site, please contact us by sending an email to info@getzep.com. \ No newline at end of file +of this Site, please contact us by sending an email to info@getzep.com. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/terms-of-service.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/terms-of-service.mdx index 2a3a6e0507..6c594af556 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/terms-of-service.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/terms-of-service.mdx @@ -3,6 +3,7 @@ title: Terms of Service slug: legal/terms-of-service --- + **Version 1.0** **Last revised on: January 27^th^, 2024** @@ -30,7 +31,7 @@ conditions of this Agreement. Cover Page -*Order Form* +_Order Form_ **Cloud Service:** Zep is a cloud-based platform-as-a-service that offers fast, scalable, privacy-compliant building blocks for Generative @@ -60,7 +61,7 @@ Period **Invoice Period:** Monthly -*Key Terms* +_Key Terms_ **Customer:** The company or person who accesses or uses the Product. If the person accepting this Agreement is doing so on behalf of a company, @@ -100,7 +101,7 @@ For Provider: notices@getzep.com For Customer: The main email address on Customer's account -*Changes to the Standard Terms* +_Changes to the Standard Terms_ **Publicity Rights:** Modifying Section 14.7 of the Standard Terms, Provider may identify Customer and use Customer's logo and trademarks on diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/website-terms-of-use.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/website-terms-of-use.mdx index 3c49f9d26b..87c88ec80b 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/website-terms-of-use.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/legal/website-terms-of-use.mdx @@ -3,6 +3,7 @@ title: Website Terms of Use slug: legal/website-terms-of-use --- + **Version 1.0** **Last revised on: January 27^th^, 2024** @@ -42,131 +43,131 @@ CLAIMS AND SEEK RELIEF IN A COURT OF LAW AND TO HAVE A JURY TRIAL.** 1. **Accounts** 1.1. **Account Creation.** In order to use certain features of the Site, - you must register for an account ("**Account**") and provide certain - information about yourself as prompted by the account registration - form. You represent and warrant that: (a) all required registration - information you submit is truthful and accurate; (b) you will - maintain the accuracy of such information. You may delete your - Account at any time, for any reason, by following the instructions - on the Site. Company may suspend or terminate your Account in - accordance with Section 7. +you must register for an account ("**Account**") and provide certain +information about yourself as prompted by the account registration +form. You represent and warrant that: (a) all required registration +information you submit is truthful and accurate; (b) you will +maintain the accuracy of such information. You may delete your +Account at any time, for any reason, by following the instructions +on the Site. Company may suspend or terminate your Account in +accordance with Section 7. 1.2. **Account Responsibilities.** You are responsible for maintaining - the confidentiality of your Account login information and are fully - responsible for all activities that occur under your Account. You - agree to immediately notify Company of any unauthorized use, or - suspected unauthorized use of your Account or any other breach of - security. Company cannot and will not be liable for any loss or - damage arising from your failure to comply with the above - requirements. +the confidentiality of your Account login information and are fully +responsible for all activities that occur under your Account. You +agree to immediately notify Company of any unauthorized use, or +suspected unauthorized use of your Account or any other breach of +security. Company cannot and will not be liable for any loss or +damage arising from your failure to comply with the above +requirements. 2. **Access to the Site** 2.1. **License.** Subject to these Terms, Company grants you a - non-transferable, non-exclusive, revocable, limited license to use - and access the Site solely for your own personal, noncommercial use. +non-transferable, non-exclusive, revocable, limited license to use +and access the Site solely for your own personal, noncommercial use. 2.2. **Certain Restrictions.** The rights granted to you in these Terms - are subject to the following restrictions: (a) you shall not - license, sell, rent, lease, transfer, assign, distribute, host, or - otherwise commercially exploit the Site, whether in whole or in - part, or any content displayed on the Site; (b) you shall not - modify, make derivative works of, disassemble, reverse compile or - reverse engineer any part of the Site; (c) you shall not access the - Site in order to build a similar or competitive website, product, or - service; and (d) except as expressly stated herein, no part of the - Site may be copied, reproduced, distributed, republished, - downloaded, displayed, posted or transmitted in any form or by any - means. Unless otherwise indicated, any future release, update, or - other addition to functionality of the Site shall be subject to - these Terms. All copyright and other proprietary notices on the Site - (or on any content displayed on the Site) must be retained on all - copies thereof. +are subject to the following restrictions: (a) you shall not +license, sell, rent, lease, transfer, assign, distribute, host, or +otherwise commercially exploit the Site, whether in whole or in +part, or any content displayed on the Site; (b) you shall not +modify, make derivative works of, disassemble, reverse compile or +reverse engineer any part of the Site; (c) you shall not access the +Site in order to build a similar or competitive website, product, or +service; and (d) except as expressly stated herein, no part of the +Site may be copied, reproduced, distributed, republished, +downloaded, displayed, posted or transmitted in any form or by any +means. Unless otherwise indicated, any future release, update, or +other addition to functionality of the Site shall be subject to +these Terms. All copyright and other proprietary notices on the Site +(or on any content displayed on the Site) must be retained on all +copies thereof. 2.3. **Modification.** Company reserves the right, at any time, to - modify, suspend, or discontinue the Site (in whole or in part) with - or without notice to you. You agree that Company will not be liable - to you or to any third party for any modification, suspension, or - discontinuation of the Site or any part thereof. - -2.4. **No Support or Maintenance.** You acknowledge and agree that - Company will have no obligation to provide you with any support or - maintenance in connection with the Site. - -2.5. **Ownership.** You acknowledge that all the intellectual property - rights, including copyrights, patents, trade marks, and trade - secrets, in the Site and its content are owned by Company or - Company's suppliers. Neither these Terms (nor your access to the - Site) transfers to you or any third party any rights, title or - interest in or to such intellectual property rights, except for the - limited access rights expressly set forth in Section 2.1. Company - and its suppliers reserve all rights not granted in these Terms. - There are no implied licenses granted under these Terms. +modify, suspend, or discontinue the Site (in whole or in part) with +or without notice to you. You agree that Company will not be liable +to you or to any third party for any modification, suspension, or +discontinuation of the Site or any part thereof. + +2.4. **No Support or Maintenance.** You acknowledge and agree that +Company will have no obligation to provide you with any support or +maintenance in connection with the Site. + +2.5. **Ownership.** You acknowledge that all the intellectual property +rights, including copyrights, patents, trade marks, and trade +secrets, in the Site and its content are owned by Company or +Company's suppliers. Neither these Terms (nor your access to the +Site) transfers to you or any third party any rights, title or +interest in or to such intellectual property rights, except for the +limited access rights expressly set forth in Section 2.1. Company +and its suppliers reserve all rights not granted in these Terms. +There are no implied licenses granted under these Terms. 2.6. **Feedback.** If you provide Company with any feedback or - suggestions regarding the Site ("**Feedback**"), you hereby assign - to Company all rights in such Feedback and agree that Company shall - have the right to use and fully exploit such Feedback and related - information in any manner it deems appropriate. Company will treat - any Feedback you provide to Company as non-confidential and - non-proprietary. You agree that you will not submit to Company any - information or ideas that you consider to be confidential or - proprietary. +suggestions regarding the Site ("**Feedback**"), you hereby assign +to Company all rights in such Feedback and agree that Company shall +have the right to use and fully exploit such Feedback and related +information in any manner it deems appropriate. Company will treat +any Feedback you provide to Company as non-confidential and +non-proprietary. You agree that you will not submit to Company any +information or ideas that you consider to be confidential or +proprietary. 3. **Indemnification.** You agree to indemnify and hold - Company (and its officers, employees, and agents) harmless, - including costs and attorneys' fees, from any claim or demand made - by any third party due to or arising out of (a) your use of the - Site, (b) your violation of these Terms or (c) your violation of - applicable laws or regulations. Company reserves the right, at your - expense, to assume the exclusive defense and control of any matter - for which you are required to indemnify us, and you agree to - cooperate with our defense of these claims. You agree not to settle - any matter without the prior written consent of Company. Company - will use reasonable efforts to notify you of any such claim, action - or proceeding upon becoming aware of it. + Company (and its officers, employees, and agents) harmless, + including costs and attorneys' fees, from any claim or demand made + by any third party due to or arising out of (a) your use of the + Site, (b) your violation of these Terms or (c) your violation of + applicable laws or regulations. Company reserves the right, at your + expense, to assume the exclusive defense and control of any matter + for which you are required to indemnify us, and you agree to + cooperate with our defense of these claims. You agree not to settle + any matter without the prior written consent of Company. Company + will use reasonable efforts to notify you of any such claim, action + or proceeding upon becoming aware of it. 4. **Third-Party Links & Ads; Other Users** 4.1. **Third-Party Links & Ads.** The Site may contain links to - third-party websites and services, and/or display advertisements for - third parties (collectively, "**Third-Party Links & Ads**"). Such - Third-Party Links & Ads are not under the control of Company, and - Company is not responsible for any Third-Party Links & Ads. Company - provides access to these Third-Party Links & Ads only as a - convenience to you, and does not review, approve, monitor, endorse, - warrant, or make any representations with respect to Third-Party - Links & Ads. You use all Third-Party Links & Ads at your own risk, - and should apply a suitable level of caution and discretion in doing - so. When you click on any of the Third-Party Links & Ads, the - applicable third party's terms and policies apply, including the - third party's privacy and data gathering practices. You should make - whatever investigation you feel necessary or appropriate before - proceeding with any transaction in connection with such Third-Party - Links & Ads. +third-party websites and services, and/or display advertisements for +third parties (collectively, "**Third-Party Links & Ads**"). Such +Third-Party Links & Ads are not under the control of Company, and +Company is not responsible for any Third-Party Links & Ads. Company +provides access to these Third-Party Links & Ads only as a +convenience to you, and does not review, approve, monitor, endorse, +warrant, or make any representations with respect to Third-Party +Links & Ads. You use all Third-Party Links & Ads at your own risk, +and should apply a suitable level of caution and discretion in doing +so. When you click on any of the Third-Party Links & Ads, the +applicable third party's terms and policies apply, including the +third party's privacy and data gathering practices. You should make +whatever investigation you feel necessary or appropriate before +proceeding with any transaction in connection with such Third-Party +Links & Ads. 4.2. **Other Users.** Your interactions with other Site users are solely - between you and such users. You agree that Company will not be - responsible for any loss or damage incurred as the result of any - such interactions. If there is a dispute between you and any Site - user, we are under no obligation to become involved. +between you and such users. You agree that Company will not be +responsible for any loss or damage incurred as the result of any +such interactions. If there is a dispute between you and any Site +user, we are under no obligation to become involved. 4.3.. **Release.** You hereby release and forever discharge Company (and - our officers, employees, agents, successors, and assigns) from, and - hereby waive and relinquish, each and every past, present and future - dispute, claim, controversy, demand, right, obligation, liability, - action and cause of action of every kind and nature (including - personal injuries, death, and property damage), that has arisen or - arises directly or indirectly out of, or that relates directly or - indirectly to, the Site (including any interactions with, or act or - omission of, other Site users or any Third-Party Links & Ads). IF - YOU ARE A CALIFORNIA RESIDENT, YOU HEREBY WAIVE CALIFORNIA CIVIL - CODE SECTION 1542 IN CONNECTION WITH THE FOREGOING, WHICH STATES: "A - GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR OR - RELEASING PARTY DOES NOT KNOW OR SUSPECT TO EXIST IN HIS OR HER - FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH IF KNOWN BY HIM OR - HER MUST HAVE MATERIALLY AFFECTED HIS OR HER SETTLEMENT WITH THE - DEBTOR OR RELEASED PARTY." +our officers, employees, agents, successors, and assigns) from, and +hereby waive and relinquish, each and every past, present and future +dispute, claim, controversy, demand, right, obligation, liability, +action and cause of action of every kind and nature (including +personal injuries, death, and property damage), that has arisen or +arises directly or indirectly out of, or that relates directly or +indirectly to, the Site (including any interactions with, or act or +omission of, other Site users or any Third-Party Links & Ads). IF +YOU ARE A CALIFORNIA RESIDENT, YOU HEREBY WAIVE CALIFORNIA CIVIL +CODE SECTION 1542 IN CONNECTION WITH THE FOREGOING, WHICH STATES: "A +GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR OR +RELEASING PARTY DOES NOT KNOW OR SUSPECT TO EXIST IN HIS OR HER +FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH IF KNOWN BY HIM OR +HER MUST HAVE MATERIALLY AFFECTED HIS OR HER SETTLEMENT WITH THE +DEBTOR OR RELEASED PARTY." 5. **Disclaimers** @@ -213,80 +214,80 @@ FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU. 7. **Term and Termination.** Subject to this Section, - these Terms will remain in full force and effect while you use the - Site. We may suspend or terminate your rights to use the Site - (including your Account) at any time for any reason at our sole - discretion, including for any use of the Site in violation of these - Terms. Upon termination of your rights under these Terms, your - Account and right to access and use the Site will terminate - immediately. Company will not have any liability whatsoever to you - for any termination of your rights under these Terms, including for - termination of your Account. Even after your rights under these - Terms are terminated, the following provisions of these Terms will - remain in effect: Sections 2.2 through 2.6 and Sections 3 through 8. + these Terms will remain in full force and effect while you use the + Site. We may suspend or terminate your rights to use the Site + (including your Account) at any time for any reason at our sole + discretion, including for any use of the Site in violation of these + Terms. Upon termination of your rights under these Terms, your + Account and right to access and use the Site will terminate + immediately. Company will not have any liability whatsoever to you + for any termination of your rights under these Terms, including for + termination of your Account. Even after your rights under these + Terms are terminated, the following provisions of these Terms will + remain in effect: Sections 2.2 through 2.6 and Sections 3 through 8. 8. **General** 8.1. **Changes.** These Terms are subject to occasional revision, and if - we make any substantial changes, we may notify you by sending you an - e-mail to the last e-mail address you provided to us (if any), - and/or by prominently posting notice of the changes on our Site. You - are responsible for providing us with your most current e-mail - address. In the event that the last e-mail address that you have - provided us is not valid, or for any reason is not capable of - delivering to you the notice described above, our dispatch of the - e-mail containing such notice will nonetheless constitute effective - notice of the changes described in the notice. Continued use of our - Site following notice of such changes shall indicate your - acknowledgement of such changes and agreement to be bound by the - terms and conditions of such changes. +we make any substantial changes, we may notify you by sending you an +e-mail to the last e-mail address you provided to us (if any), +and/or by prominently posting notice of the changes on our Site. You +are responsible for providing us with your most current e-mail +address. In the event that the last e-mail address that you have +provided us is not valid, or for any reason is not capable of +delivering to you the notice described above, our dispatch of the +e-mail containing such notice will nonetheless constitute effective +notice of the changes described in the notice. Continued use of our +Site following notice of such changes shall indicate your +acknowledgement of such changes and agreement to be bound by the +terms and conditions of such changes. 8.2. **Dispute Resolution.** Please read the following - arbitration agreement in this Section (the "**Arbitration - Agreement**") carefully.  It requires you to arbitrate disputes with - Company, its parent companies, subsidiaries, affiliates, successors - and assigns and all of their respective officers, directors, - employees, agents, and representatives (collectively, the "**Company - Parties**") and limits the manner in which you can seek relief from - the Company Parties  +arbitration agreement in this Section (the "**Arbitration +Agreement**") carefully.  It requires you to arbitrate disputes with +Company, its parent companies, subsidiaries, affiliates, successors +and assigns and all of their respective officers, directors, +employees, agents, and representatives (collectively, the "**Company +Parties**") and limits the manner in which you can seek relief from +the Company Parties (a) **Applicability of Arbitration Agreement** You - agree that any dispute between you and any of the Company Parties - relating in any way to the Site, the services offered on the Site - (the "**Services**") or these Terms will be resolved by binding - arbitration, rather than in court, except that (1) you and the - Company Parties may assert individualized claims in small claims - court if the claims qualify, remain in such court and advance solely - on an individual, non-class basis; and (2) you or the Company - Parties may seek equitable relief in court for infringement or other - misuse of intellectual property rights (such as trademarks, trade - dress, domain names, trade secrets, copyrights, and patents). **This - Arbitration Agreement shall survive the expiration or termination of - these Terms and shall apply, without limitation, to all claims that - arose or were asserted before you agreed to these Terms (in - accordance with the preamble) or any prior version of these - Terms.** This Arbitration Agreement does not preclude you from - bringing issues to the attention of federal, state or local - agencies. Such agencies can, if the law allows, seek relief against - the Company Parties on your behalf. For purposes of this Arbitration - Agreement, "**Dispute**" will also include disputes that arose or - involve facts occurring before the existence of this or any prior - versions of the Agreement as well as claims that may arise after the - termination of these Terms. +agree that any dispute between you and any of the Company Parties +relating in any way to the Site, the services offered on the Site +(the "**Services**") or these Terms will be resolved by binding +arbitration, rather than in court, except that (1) you and the +Company Parties may assert individualized claims in small claims +court if the claims qualify, remain in such court and advance solely +on an individual, non-class basis; and (2) you or the Company +Parties may seek equitable relief in court for infringement or other +misuse of intellectual property rights (such as trademarks, trade +dress, domain names, trade secrets, copyrights, and patents). **This +Arbitration Agreement shall survive the expiration or termination of +these Terms and shall apply, without limitation, to all claims that +arose or were asserted before you agreed to these Terms (in +accordance with the preamble) or any prior version of these +Terms.** This Arbitration Agreement does not preclude you from +bringing issues to the attention of federal, state or local +agencies. Such agencies can, if the law allows, seek relief against +the Company Parties on your behalf. For purposes of this Arbitration +Agreement, "**Dispute**" will also include disputes that arose or +involve facts occurring before the existence of this or any prior +versions of the Agreement as well as claims that may arise after the +termination of these Terms. (b) **Informal Dispute Resolution.** There might be instances when a - Dispute arises between you and Company. If that occurs, Company is - committed to working with you to reach a reasonable resolution. You - and Company agree that good faith informal efforts to resolve - Disputes can result in a prompt, low‐cost and mutually beneficial - outcome. You and Company therefore agree that before either party - commences arbitration against the other (or initiates an action in - small claims court if a party so elects), we will personally meet - and confer telephonically or via videoconference, in a good faith - effort to resolve informally any Dispute covered by this Arbitration - Agreement ("**Informal Dispute Resolution Conference**"). If you are - represented by counsel, your counsel may participate in the - conference, but you will also participate in the conference. +Dispute arises between you and Company. If that occurs, Company is +committed to working with you to reach a reasonable resolution. You +and Company agree that good faith informal efforts to resolve +Disputes can result in a prompt, low‐cost and mutually beneficial +outcome. You and Company therefore agree that before either party +commences arbitration against the other (or initiates an action in +small claims court if a party so elects), we will personally meet +and confer telephonically or via videoconference, in a good faith +effort to resolve informally any Dispute covered by this Arbitration +Agreement ("**Informal Dispute Resolution Conference**"). If you are +represented by counsel, your counsel may participate in the +conference, but you will also participate in the conference. The party initiating a Dispute must give notice to the other party in writing of its intent to initiate an Informal Dispute Resolution @@ -314,45 +315,45 @@ informal communications to resolve the initiating party's Dispute. Engaging in the Informal Dispute Resolution Conference is a condition precedent and requirement that must be fulfilled before commencing arbitration. The statute of limitations and any filing -fee deadlines shall be tolled while the parties engage in the +fee deadlines shall be tolled while the parties engage in the Informal Dispute Resolution Conference process required by this section. (c) **Arbitration Rules and Forum.** These Terms evidence - a transaction involving interstate commerce; and notwithstanding any - other provision herein with respect to the applicable substantive - law, the Federal Arbitration Act, 9 U.S.C. § 1 et seq., will govern - the interpretation and enforcement of this Arbitration Agreement and - any arbitration proceedings. If the Informal Dispute Resolution - Process described above does not resolve satisfactorily within 60 - days after receipt of your Notice, you and Company agree that either - party shall have the right to finally resolve the Dispute through - binding arbitration. The Federal Arbitration Act governs the - interpretation and enforcement of this Arbitration Agreement. The - arbitration will be conducted by JAMS, an established alternative - dispute resolution provider. Disputes involving claims and - counterclaims with an amount in controversy under \$250,000, not - inclusive of attorneys' fees and interest, shall be subject to JAMS' - most current version of the Streamlined Arbitration Rules and - procedures available - at http://www.jamsadr.com/rules-streamlined-arbitration/; all - other claims shall be subject to JAMS's most current version of the - Comprehensive Arbitration Rules and Procedures, available - at http://www.jamsadr.com/rules-comprehensive-arbitration/. JAMS's - rules are also available at www.jamsadr.com or by calling JAMS at - 800-352-5267. A party who wishes to initiate arbitration must - provide the other party with a request for arbitration (the - "**Request**"). The Request must include: (1) the name, telephone - number, mailing address, e‐mail address of the party seeking - arbitration and the account username (if applicable) as well as the - email address associated with any applicable account; (2) a - statement of the legal claims being asserted and the factual bases - of those claims; (3) a description of the remedy sought and an - accurate, good‐faith calculation of the amount in controversy in - United States Dollars; (4) a statement certifying completion of the - Informal Dispute Resolution process as described above; and (5) - evidence that the requesting party has paid any necessary filing - fees in connection with such arbitration. +a transaction involving interstate commerce; and notwithstanding any +other provision herein with respect to the applicable substantive +law, the Federal Arbitration Act, 9 U.S.C. § 1 et seq., will govern +the interpretation and enforcement of this Arbitration Agreement and +any arbitration proceedings. If the Informal Dispute Resolution +Process described above does not resolve satisfactorily within 60 +days after receipt of your Notice, you and Company agree that either +party shall have the right to finally resolve the Dispute through +binding arbitration. The Federal Arbitration Act governs the +interpretation and enforcement of this Arbitration Agreement. The +arbitration will be conducted by JAMS, an established alternative +dispute resolution provider. Disputes involving claims and +counterclaims with an amount in controversy under \$250,000, not +inclusive of attorneys' fees and interest, shall be subject to JAMS' +most current version of the Streamlined Arbitration Rules and +procedures available +at http://www.jamsadr.com/rules-streamlined-arbitration/; all +other claims shall be subject to JAMS's most current version of the +Comprehensive Arbitration Rules and Procedures, available +at http://www.jamsadr.com/rules-comprehensive-arbitration/. JAMS's +rules are also available at www.jamsadr.com or by calling JAMS at +800-352-5267. A party who wishes to initiate arbitration must +provide the other party with a request for arbitration (the +"**Request**"). The Request must include: (1) the name, telephone +number, mailing address, e‐mail address of the party seeking +arbitration and the account username (if applicable) as well as the +email address associated with any applicable account; (2) a +statement of the legal claims being asserted and the factual bases +of those claims; (3) a description of the remedy sought and an +accurate, good‐faith calculation of the amount in controversy in +United States Dollars; (4) a statement certifying completion of the +Informal Dispute Resolution process as described above; and (5) +evidence that the requesting party has paid any necessary filing +fees in connection with such arbitration. If the party requesting arbitration is represented by counsel, the Request shall also include counsel's name, telephone number, mailing @@ -388,118 +389,118 @@ that they agree to keep all materials and documents exchanged during the arbitration proceedings confidential. (d) **Authority of Arbitrator.** The arbitrator shall have - exclusive authority to resolve all disputes subject to arbitration - hereunder including, without limitation, any dispute related to the - interpretation, applicability, enforceability or formation of this - Arbitration Agreement or any portion of the Arbitration Agreement, - except for the following: (1) all Disputes arising out of or - relating to the subsection entitled "Waiver of Class or Other - Non-Individualized Relief," including any claim that all or part of - the subsection entitled "Waiver of Class or Other Non-Individualized - Relief" is unenforceable, illegal, void or voidable, or that such - subsection entitled "Waiver of Class or Other Non-Individualized - Relief" has been breached, shall be decided by a court of competent - jurisdiction and not by an arbitrator; (2) except as expressly - contemplated in the subsection entitled "Batch Arbitration," all - Disputes about the payment of arbitration fees shall be decided only - by a court of competent jurisdiction and not by an arbitrator; (3) - all Disputes about whether either party has satisfied any condition - precedent to arbitration shall be decided only by a court of - competent jurisdiction and not by an arbitrator; and (4) all - Disputes about which version of the Arbitration Agreement applies - shall be decided only by a court of competent jurisdiction and not - by an arbitrator. The arbitration proceeding will not be - consolidated with any other matters or joined with any other cases - or parties, except as expressly provided in the subsection entitled - "Batch Arbitration." The arbitrator shall have the authority to - grant motions dispositive of all or part of any claim or dispute. - The arbitrator shall have the authority to award monetary damages - and to grant any non-monetary remedy or relief available to an - individual party under applicable law, the arbitral forum's rules, - and these Terms (including the Arbitration Agreement). The - arbitrator shall issue a written award and statement of decision - describing the essential findings and conclusions on which any award - (or decision not to render an award) is based, including the - calculation of any damages awarded. The arbitrator shall follow the - applicable law. The award of the arbitrator is final and binding - upon you and us. Judgment on the arbitration award may be entered in - any court having jurisdiction. +exclusive authority to resolve all disputes subject to arbitration +hereunder including, without limitation, any dispute related to the +interpretation, applicability, enforceability or formation of this +Arbitration Agreement or any portion of the Arbitration Agreement, +except for the following: (1) all Disputes arising out of or +relating to the subsection entitled "Waiver of Class or Other +Non-Individualized Relief," including any claim that all or part of +the subsection entitled "Waiver of Class or Other Non-Individualized +Relief" is unenforceable, illegal, void or voidable, or that such +subsection entitled "Waiver of Class or Other Non-Individualized +Relief" has been breached, shall be decided by a court of competent +jurisdiction and not by an arbitrator; (2) except as expressly +contemplated in the subsection entitled "Batch Arbitration," all +Disputes about the payment of arbitration fees shall be decided only +by a court of competent jurisdiction and not by an arbitrator; (3) +all Disputes about whether either party has satisfied any condition +precedent to arbitration shall be decided only by a court of +competent jurisdiction and not by an arbitrator; and (4) all +Disputes about which version of the Arbitration Agreement applies +shall be decided only by a court of competent jurisdiction and not +by an arbitrator. The arbitration proceeding will not be +consolidated with any other matters or joined with any other cases +or parties, except as expressly provided in the subsection entitled +"Batch Arbitration." The arbitrator shall have the authority to +grant motions dispositive of all or part of any claim or dispute. +The arbitrator shall have the authority to award monetary damages +and to grant any non-monetary remedy or relief available to an +individual party under applicable law, the arbitral forum's rules, +and these Terms (including the Arbitration Agreement). The +arbitrator shall issue a written award and statement of decision +describing the essential findings and conclusions on which any award +(or decision not to render an award) is based, including the +calculation of any damages awarded. The arbitrator shall follow the +applicable law. The award of the arbitrator is final and binding +upon you and us. Judgment on the arbitration award may be entered in +any court having jurisdiction. (e) **Waiver of Jury Trial.** EXCEPT AS SPECIFIED in - section 8.2(a) YOU AND THE COMPANY PARTIES HEREBY WAIVE ANY - CONSTITUTIONAL AND STATUTORY RIGHTS TO SUE IN COURT AND HAVE A TRIAL - IN FRONT OF A JUDGE OR A JURY. You and the Company Parties are - instead electing that all covered claims and disputes shall be - resolved exclusively by arbitration under this Arbitration - Agreement, except as specified in Section 8.2(a) above. An - arbitrator can award on an individual basis the same damages and - relief as a court and must follow these Terms as a court would. - However, there is no judge or jury in arbitration, and court review - of an arbitration award is subject to very limited review.  +section 8.2(a) YOU AND THE COMPANY PARTIES HEREBY WAIVE ANY +CONSTITUTIONAL AND STATUTORY RIGHTS TO SUE IN COURT AND HAVE A TRIAL +IN FRONT OF A JUDGE OR A JURY. You and the Company Parties are +instead electing that all covered claims and disputes shall be +resolved exclusively by arbitration under this Arbitration +Agreement, except as specified in Section 8.2(a) above. An +arbitrator can award on an individual basis the same damages and +relief as a court and must follow these Terms as a court would. +However, there is no judge or jury in arbitration, and court review +of an arbitration award is subject to very limited review. (f) **Waiver of Class or Other Non-Individualized - Relief.**  YOU AND COMPANY AGREE THAT, EXCEPT AS - SPECIFIED IN SUBSECTION 8.2(h) EACH OF US MAY BRING CLAIMS AGAINST - THE OTHER ONLY ON AN INDIVIDUAL BASIS AND NOT ON A CLASS, - REPRESENTATIVE, OR COLLECTIVE BASIS, AND THE PARTIES HEREBY WAIVE - ALL RIGHTS TO HAVE ANY DISPUTE BE BROUGHT, HEARD, ADMINISTERED, - RESOLVED, OR ARBITRATED ON A CLASS, COLLECTIVE, REPRESENTATIVE, OR - MASS ACTION BASIS. ONLY INDIVIDUAL RELIEF IS AVAILABLE, AND DISPUTES - OF MORE THAN ONE CUSTOMER OR USER CANNOT BE ARBITRATED OR - CONSOLIDATED WITH THOSE OF ANY OTHER CUSTOMER OR USER. Subject to - this Arbitration Agreement, the arbitrator may award declaratory or - injunctive relief only in favor of the individual party seeking - relief and only to the extent necessary to provide relief warranted - by the party's individual claim. Nothing in this paragraph is - intended to, nor shall it, affect the terms and conditions under the - Subsection 8.2(h) entitled "Batch Arbitration." Notwithstanding - anything to the contrary in this Arbitration Agreement, if a court - decides by means of a final decision, not subject to any further - appeal or recourse, that the limitations of this subsection, "Waiver - of Class or Other Non-Individualized Relief," are invalid or - unenforceable as to a particular claim or request for relief (such - as a request for public injunctive relief), you and Company agree - that that particular claim or request for relief (and only that - particular claim or request for relief) shall be severed from the - arbitration and may be litigated in the state or federal courts - located in the State of California. All other Disputes shall be - arbitrated or litigated in small claims court. This subsection does - not prevent you or Company from participating in a class-wide - settlement of claims. +Relief.**  YOU AND COMPANY AGREE THAT, EXCEPT AS +SPECIFIED IN SUBSECTION 8.2(h) EACH OF US MAY BRING CLAIMS AGAINST +THE OTHER ONLY ON AN INDIVIDUAL BASIS AND NOT ON A CLASS, +REPRESENTATIVE, OR COLLECTIVE BASIS, AND THE PARTIES HEREBY WAIVE +ALL RIGHTS TO HAVE ANY DISPUTE BE BROUGHT, HEARD, ADMINISTERED, +RESOLVED, OR ARBITRATED ON A CLASS, COLLECTIVE, REPRESENTATIVE, OR +MASS ACTION BASIS. ONLY INDIVIDUAL RELIEF IS AVAILABLE, AND DISPUTES +OF MORE THAN ONE CUSTOMER OR USER CANNOT BE ARBITRATED OR +CONSOLIDATED WITH THOSE OF ANY OTHER CUSTOMER OR USER. Subject to +this Arbitration Agreement, the arbitrator may award declaratory or +injunctive relief only in favor of the individual party seeking +relief and only to the extent necessary to provide relief warranted +by the party's individual claim. Nothing in this paragraph is +intended to, nor shall it, affect the terms and conditions under the +Subsection 8.2(h) entitled "Batch Arbitration." Notwithstanding +anything to the contrary in this Arbitration Agreement, if a court +decides by means of a final decision, not subject to any further +appeal or recourse, that the limitations of this subsection, "Waiver +of Class or Other Non-Individualized Relief," are invalid or +unenforceable as to a particular claim or request for relief (such +as a request for public injunctive relief), you and Company agree +that that particular claim or request for relief (and only that +particular claim or request for relief) shall be severed from the +arbitration and may be litigated in the state or federal courts +located in the State of California. All other Disputes shall be +arbitrated or litigated in small claims court. This subsection does +not prevent you or Company from participating in a class-wide +settlement of claims. (g) **Attorneys' Fees and Costs.** The parties shall bear their own - attorneys' fees and costs in arbitration unless the arbitrator finds - that either the substance of the Dispute or the relief sought in the - Request was frivolous or was brought for an improper purpose (as - measured by the standards set forth in Federal Rule of Civil - Procedure 11(b)). If you or Company need to invoke the authority of - a court of competent jurisdiction to compel arbitration, then the - party that obtains an order compelling arbitration in such action - shall have the right to collect from the other party its reasonable - costs, necessary disbursements, and reasonable attorneys' fees - incurred in securing an order compelling arbitration. The prevailing - party in any court action relating to whether either party has - satisfied any condition precedent to arbitration, including the - Informal Dispute Resolution Process, is entitled to recover their - reasonable costs, necessary disbursements, and reasonable attorneys' - fees and costs. +attorneys' fees and costs in arbitration unless the arbitrator finds +that either the substance of the Dispute or the relief sought in the +Request was frivolous or was brought for an improper purpose (as +measured by the standards set forth in Federal Rule of Civil +Procedure 11(b)). If you or Company need to invoke the authority of +a court of competent jurisdiction to compel arbitration, then the +party that obtains an order compelling arbitration in such action +shall have the right to collect from the other party its reasonable +costs, necessary disbursements, and reasonable attorneys' fees +incurred in securing an order compelling arbitration. The prevailing +party in any court action relating to whether either party has +satisfied any condition precedent to arbitration, including the +Informal Dispute Resolution Process, is entitled to recover their +reasonable costs, necessary disbursements, and reasonable attorneys' +fees and costs. (h) **Batch Arbitration.** To increase the efficiency of administration - and resolution of arbitrations, you and Company agree that in the - event that there are 100 or more individual Requests of a - substantially similar nature filed against Company by or with the - assistance of the same law firm, group of law firms, or - organizations, within a 30 day period (or as soon as possible - thereafter), the JAMS shall (1) administer the arbitration demands - in batches of 100 Requests per batch (plus, to the extent there are - less than 100 Requests left over after the batching described above, - a final batch consisting of the remaining Requests); (2) appoint one - arbitrator for each batch; and (3) provide for the resolution of - each batch as a single consolidated arbitration with one set of - filing and administrative fees due per side per batch, one - procedural calendar, one hearing (if any) in a place to be - determined by the arbitrator, and one final award ("**Batch - Arbitration**"). +and resolution of arbitrations, you and Company agree that in the +event that there are 100 or more individual Requests of a +substantially similar nature filed against Company by or with the +assistance of the same law firm, group of law firms, or +organizations, within a 30 day period (or as soon as possible +thereafter), the JAMS shall (1) administer the arbitration demands +in batches of 100 Requests per batch (plus, to the extent there are +less than 100 Requests left over after the batching described above, +a final batch consisting of the remaining Requests); (2) appoint one +arbitrator for each batch; and (3) provide for the resolution of +each batch as a single consolidated arbitration with one set of +filing and administrative fees due per side per batch, one +procedural calendar, one hearing (if any) in a place to be +determined by the arbitrator, and one final award ("**Batch +Arbitration**"). All parties agree that Requests are of a "substantially similar nature" if they arise out of or relate to the same event or factual @@ -530,109 +531,109 @@ under any circumstances, except as expressly set forth in this provision. (i) **30-Day Right to Opt Out.**  You have the right to opt out of the - provisions of this Arbitration Agreement by sending a timely written - notice of your decision to opt out to the following address: - 2261 Market Street #5686, San Francisco, CA 94114, or email to info@getzep.com, - within 30 days after first becoming subject to this Arbitration - Agreement. Your notice must include your name and address and a - clear statement that you want to opt out of this Arbitration - Agreement. If you opt out of this Arbitration Agreement, all other - parts of these Terms will continue to apply to you. Opting out of - this Arbitration Agreement has no effect on any other arbitration - agreements that you may currently have with us, or may enter into in - the future with us. +provisions of this Arbitration Agreement by sending a timely written +notice of your decision to opt out to the following address: +2261 Market Street #5686, San Francisco, CA 94114, or email to info@getzep.com, +within 30 days after first becoming subject to this Arbitration +Agreement. Your notice must include your name and address and a +clear statement that you want to opt out of this Arbitration +Agreement. If you opt out of this Arbitration Agreement, all other +parts of these Terms will continue to apply to you. Opting out of +this Arbitration Agreement has no effect on any other arbitration +agreements that you may currently have with us, or may enter into in +the future with us. (j) **Invalidity, Expiration.** Except as provided in the subsection - entitled "Waiver of Class or Other Non-Individualized Relief", if - any part or parts of this Arbitration Agreement are found under the - law to be invalid or unenforceable, then such specific part or parts - shall be of no force and effect and shall be severed and the - remainder of the Arbitration Agreement shall continue in full force - and effect. You further agree that any Dispute that you have with - Company as detailed in this Arbitration Agreement must be initiated - via arbitration within the applicable statute of limitation for that - claim or controversy, or it will be forever time barred. Likewise, - you agree that all applicable statutes of limitation will apply to - such arbitration in the same manner as those statutes of limitation - would apply in the applicable court of competent jurisdiction. +entitled "Waiver of Class or Other Non-Individualized Relief", if +any part or parts of this Arbitration Agreement are found under the +law to be invalid or unenforceable, then such specific part or parts +shall be of no force and effect and shall be severed and the +remainder of the Arbitration Agreement shall continue in full force +and effect. You further agree that any Dispute that you have with +Company as detailed in this Arbitration Agreement must be initiated +via arbitration within the applicable statute of limitation for that +claim or controversy, or it will be forever time barred. Likewise, +you agree that all applicable statutes of limitation will apply to +such arbitration in the same manner as those statutes of limitation +would apply in the applicable court of competent jurisdiction. (k)**Modification.** Notwithstanding any provision in - these Terms to the contrary, we agree that if Company makes any - future material change to this Arbitration Agreement, you may reject - that change within 30 days of such change becoming effective by - writing Company at the following address: 2261 Market Street #5686, - San Francisco, CA 94114, or email to info@getzep.com. Unless you reject the - change within 30 days of such change becoming effective by writing - to Company in accordance with the foregoing, your continued use of - the Site and/or Services, including the acceptance of products and - services offered on the Site following the posting of changes to - this Arbitration Agreement constitutes your acceptance of any such - changes. Changes to this Arbitration Agreement do not provide you - with a new opportunity to opt out of the Arbitration Agreement if - you have previously agreed to a version of these Terms and did not - validly opt out of arbitration. If you reject any change or update - to this Arbitration Agreement, and you were bound by an existing - agreement to arbitrate Disputes arising out of or relating in any - way to your access to or use of the Services or of the Site, any - communications you receive, any products sold or distributed through - the Site, the Services, or these Terms, the provisions of this - Arbitration Agreement as of the date you first accepted these Terms - (or accepted any subsequent changes to these Terms) remain in full - force and effect. Company will continue to honor any valid opt outs - of the Arbitration Agreement that you made to a prior version of - these Terms.  +these Terms to the contrary, we agree that if Company makes any +future material change to this Arbitration Agreement, you may reject +that change within 30 days of such change becoming effective by +writing Company at the following address: 2261 Market Street #5686, +San Francisco, CA 94114, or email to info@getzep.com. Unless you reject the +change within 30 days of such change becoming effective by writing +to Company in accordance with the foregoing, your continued use of +the Site and/or Services, including the acceptance of products and +services offered on the Site following the posting of changes to +this Arbitration Agreement constitutes your acceptance of any such +changes. Changes to this Arbitration Agreement do not provide you +with a new opportunity to opt out of the Arbitration Agreement if +you have previously agreed to a version of these Terms and did not +validly opt out of arbitration. If you reject any change or update +to this Arbitration Agreement, and you were bound by an existing +agreement to arbitrate Disputes arising out of or relating in any +way to your access to or use of the Services or of the Site, any +communications you receive, any products sold or distributed through +the Site, the Services, or these Terms, the provisions of this +Arbitration Agreement as of the date you first accepted these Terms +(or accepted any subsequent changes to these Terms) remain in full +force and effect. Company will continue to honor any valid opt outs +of the Arbitration Agreement that you made to a prior version of +these Terms. 8.3. **Export.** The Site may be subject to U.S. export control laws and - may be subject to export or import regulations in other countries. - You agree not to export, reexport, or transfer, directly or - indirectly, any U.S. technical data acquired from Company, or any - products utilizing such data, in violation of the United States - export laws or regulations. +may be subject to export or import regulations in other countries. +You agree not to export, reexport, or transfer, directly or +indirectly, any U.S. technical data acquired from Company, or any +products utilizing such data, in violation of the United States +export laws or regulations. 8.4. **Disclosures.** Company is located at the address in Section 8.8. - If you are a California resident, you may report complaints to the - Complaint Assistance Unit of the Division of Consumer Product of the - California Department of Consumer Affairs by contacting them in - writing at 400 R Street, Sacramento, CA 95814, or by telephone - at (800) 952-5210. +If you are a California resident, you may report complaints to the +Complaint Assistance Unit of the Division of Consumer Product of the +California Department of Consumer Affairs by contacting them in +writing at 400 R Street, Sacramento, CA 95814, or by telephone +at (800) 952-5210. 9.5. **Electronic Communications.** The communications between you and - Company use electronic means, whether you use the Site or send us - emails, or whether Company posts notices on the Site or communicates - with you via email. For contractual purposes, you (a) consent to - receive communications from Company in an electronic form; and (b) - agree that all terms and conditions, agreements, notices, - disclosures, and other communications that Company provides to you - electronically satisfy any legal requirement that such - communications would satisfy if it were be in a hardcopy writing. - The foregoing does not affect your non-waivable rights. +Company use electronic means, whether you use the Site or send us +emails, or whether Company posts notices on the Site or communicates +with you via email. For contractual purposes, you (a) consent to +receive communications from Company in an electronic form; and (b) +agree that all terms and conditions, agreements, notices, +disclosures, and other communications that Company provides to you +electronically satisfy any legal requirement that such +communications would satisfy if it were be in a hardcopy writing. +The foregoing does not affect your non-waivable rights. 8.6. **Entire Terms.** These Terms constitute the entire agreement - between you and us regarding the use of the Site. Our failure to - exercise or enforce any right or provision of these Terms shall not - operate as a waiver of such right or provision. The section titles - in these Terms are for convenience only and have no legal or - contractual effect. The word "including" means "including without - limitation". If any provision of these Terms is, for any reason, - held to be invalid or unenforceable, the other provisions of these - Terms will be unimpaired and the invalid or unenforceable provision - will be deemed modified so that it is valid and enforceable to the - maximum extent permitted by law. Your relationship to Company is - that of an independent contractor, and neither party is an agent or - partner of the other. These Terms, and your rights and obligations - herein, may not be assigned, subcontracted, delegated, or otherwise - transferred by you without Company's prior written consent, and any - attempted assignment, subcontract, delegation, or transfer in - violation of the foregoing will be null and void. Company may freely - assign these Terms. The terms and conditions set forth in these - Terms shall be binding upon assignees. +between you and us regarding the use of the Site. Our failure to +exercise or enforce any right or provision of these Terms shall not +operate as a waiver of such right or provision. The section titles +in these Terms are for convenience only and have no legal or +contractual effect. The word "including" means "including without +limitation". If any provision of these Terms is, for any reason, +held to be invalid or unenforceable, the other provisions of these +Terms will be unimpaired and the invalid or unenforceable provision +will be deemed modified so that it is valid and enforceable to the +maximum extent permitted by law. Your relationship to Company is +that of an independent contractor, and neither party is an agent or +partner of the other. These Terms, and your rights and obligations +herein, may not be assigned, subcontracted, delegated, or otherwise +transferred by you without Company's prior written consent, and any +attempted assignment, subcontract, delegation, or transfer in +violation of the foregoing will be null and void. Company may freely +assign these Terms. The terms and conditions set forth in these +Terms shall be binding upon assignees. 8.7. **Copyright/Trademark Information**. Copyright ©2024 Zep Software, Inc. All rights - reserved. All trademarks, logos and service marks ("**Marks**") - displayed on the Site are our property or the property of other - third parties. You are not permitted to use these Marks without our - prior written consent or the consent of such third party which may - own the Marks. +reserved. All trademarks, logos and service marks ("**Marks**") +displayed on the Site are our property or the property of other +third parties. You are not permitted to use these Marks without our +prior written consent or the consent of such third party which may +own the Marks. **Contact Information:** diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/openapi/openapi.json b/clis/docs-migrator/src/__test__/outputs/zep/fern/openapi/openapi.json index 248078eaf2..8a113c1769 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/openapi/openapi.json +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/openapi/openapi.json @@ -1 +1,1592 @@ -{"openapi":"3.0.1","info":{"title":"Zep Cloud API","contact":{},"version":"0.x"},"servers":[{"url":"https://app.getzep.com/api/v2"}],"paths":{"/api/v2/collections/{collectionName}/documents/uuid/{documentUUID}":{"patch":{"tags":["document"],"summary":"Updates a Document in a DocumentCollection by UUID","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}},{"name":"documentUUID","in":"path","description":"UUID of the Document to be updated","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Document to be updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateDocumentRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"document"}},"/collection/{collectionName}/documents/uuid/{documentUUID}":{"get":{"tags":["document"],"summary":"Gets a Document from a DocumentCollection by UUID","description":"Returns specified Document from a DocumentCollection.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}},{"name":"documentUUID","in":"path","description":"UUID of the Document to be updated","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DocumentResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/collections":{"get":{"tags":["collection"],"summary":"Gets a list of DocumentCollections","description":"Returns a list of all DocumentCollections.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/models.DocumentCollectionResponse"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/collections/{collectionName}":{"get":{"tags":["collection"],"summary":"Gets a DocumentCollection","description":"Returns a DocumentCollection if it exists.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DocumentCollectionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["collection"],"summary":"Creates a new DocumentCollection","description":"If a collection with the same name already exists, an error will be returned.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Document Collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateDocumentCollectionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"collection"},"delete":{"tags":["collection"],"summary":"Deletes a DocumentCollection","description":"If a collection with the same name already exists, it will be overwritten.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"patch":{"tags":["collection"],"summary":"Updates a DocumentCollection","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Document Collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateDocumentCollectionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"collection"}},"/collections/{collectionName}/document":{"post":{"tags":["document"],"summary":"Creates Multiple Documents in a DocumentCollection","description":"Creates Documents in a specified DocumentCollection and returns their UUIDs.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Array of Documents to be created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.CreateDocumentRequest"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"documents"}},"/collections/{collectionName}/documents/batchDelete":{"post":{"tags":["document"],"summary":"Batch Deletes Documents from a DocumentCollection by UUID","description":"Deletes specified Documents from a DocumentCollection.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"UUIDs of the Documents to be deleted","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"documentUUIDs"}},"/collections/{collectionName}/documents/batchGet":{"post":{"tags":["document"],"summary":"Batch Gets Documents from a DocumentCollection","description":"Returns Documents from a DocumentCollection specified by UUID or ID.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"UUIDs and IDs of the Documents to be fetched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.GetDocumentListRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/models.DocumentResponse"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"documentRequest"}},"/collections/{collectionName}/documents/batchUpdate":{"patch":{"tags":["document"],"summary":"Batch Updates Documents in a DocumentCollection","description":"Updates Documents in a specified DocumentCollection.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Array of Documents to be updated","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.UpdateDocumentListRequest"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"documents"}},"/collections/{collectionName}/documents/uuid/{documentUUID}":{"delete":{"tags":["document"],"summary":"Delete Document from a DocumentCollection by UUID","description":"Delete specified Document from a DocumentCollection.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}},{"name":"documentUUID","in":"path","description":"UUID of the Document to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Document Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/collections/{collectionName}/index/create":{"post":{"tags":["collection"],"summary":"Creates an index for a DocumentCollection","description":"Creates an index for the specified DocumentCollection to improve query performance.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}},{"name":"force","in":"query","description":"Force index creation, even if there are too few documents to index","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/collections/{collectionName}/search":{"post":{"tags":["document"],"summary":"Searches Documents in a DocumentCollection","description":"Searches Documents in a DocumentCollection based on provided search criteria.","parameters":[{"name":"collectionName","in":"path","description":"Name of the Document Collection","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Limit the number of returned documents","schema":{"type":"integer"}}],"requestBody":{"description":"Search criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DocumentSearchPayload"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.DocumentSearchResultPage"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"searchPayload"}},"/sessions":{"get":{"tags":["session"],"summary":"Returns all sessions","description":"Get all sessions with optional limit and cursor for pagination.","parameters":[{"name":"limit","in":"query","description":"Limit the number of results returned","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for pagination","schema":{"type":"integer"}}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.Session"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["session"],"summary":"Add a session","description":"add session by id","requestBody":{"description":"Session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateSessionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Session"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"session"}},"/sessions/{sessionId}":{"get":{"tags":["session"],"summary":"Returns a session by ID","description":"get session by id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Session"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"patch":{"tags":["session"],"summary":"Add a session","description":"add session by id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateSessionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Session"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"session"}},"/sessions/{sessionId}/classify":{"post":{"tags":["session"],"summary":"Classify a session","description":"classify a session by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Classify request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ClassifySessionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ClassifySessionResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"classifyRequest"}},"/sessions/{sessionId}/memory":{"get":{"tags":["memory"],"summary":"Returns a memory (latest summary and list of messages) for a given session","description":"get memory by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}},{"name":"memoryType","in":"query","description":"memoryType: perpetual or message_window","schema":{"type":"string"}},{"name":"lastn","in":"query","description":"Last N messages. Overrides memory_window configuration","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.Memory"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["memory"],"summary":"Add memory messages to a given session","description":"add memory messages by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Memory messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Memory"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"memoryMessages"},"delete":{"tags":["memory"],"summary":"Delete memory messages for a given session","description":"delete memory messages by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/sessions/{sessionId}/messages":{"get":{"tags":["messages"],"summary":"Retrieves all messages for a specific session","description":"get messages by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.Message"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}}}},"/sessions/{sessionId}/messages/{messageId}":{"get":{"tags":["messages"],"summary":"Retrieves a specific message","description":"get message by session id and message id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","description":"Message ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Message"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}}},"patch":{"tags":["messages"],"summary":"Updates the metadata of a specific message","description":"update message metadata by session id and message id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","description":"Message ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"New Metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Message"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Message"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"x-codegen-request-body-name":"body"}},"/sessions/{sessionId}/search":{"post":{"tags":["search"],"summary":"Search memory messages for a given session","description":"search memory messages by session id and query","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Limit the number of results returned","schema":{"type":"integer"}}],"requestBody":{"description":"Search query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.MemorySearchPayload"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.MemorySearchResult"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"searchPayload"}},"/sessions/{sessionId}/summaries":{"get":{"tags":["session"],"summary":"Returns a session's summaries by ID","description":"Get session summaries by ID","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SummaryListResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/sessions/{sessionId}/synthesize_question":{"get":{"tags":["memory"],"summary":"Synthesize a question for a given session","description":"synthesize a question by session id","parameters":[{"name":"sessionId","in":"path","description":"Session ID","required":true,"schema":{"type":"string"}},{"name":"lastNMessages","in":"query","description":"Last N messages","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.Question"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/user":{"get":{"tags":["user"],"summary":"List all users","description":"List all users with pagination.","parameters":[{"name":"pageNumber","in":"query","description":"Page number for pagination, starting from 1","schema":{"type":"integer"}},{"name":"pageSize","in":"query","description":"Number of users to retrieve per page","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successfully retrieved list of users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.User"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"post":{"tags":["user"],"summary":"Add a user","description":"add user by id","requestBody":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateUserRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"user"}},"/users-ordered":{"get":{"tags":["user"],"summary":"List all users","description":"list all users","parameters":[{"name":"limit","in":"query","description":"Limit","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successfully retrieved list of users","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/models.User"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}},"/users/{userId}":{"get":{"tags":["user"],"summary":"Returns a user by ID","description":"get user by id","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"delete":{"tags":["user"],"summary":"Delete a user","description":"delete user by id","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]},"patch":{"tags":["user"],"summary":"Update a user","description":"update user by id","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UpdateUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"user"}},"/users/{userId}/sessions":{"get":{"tags":["user"],"summary":"List all sessions for a user","description":"list all sessions for a user by user id","parameters":[{"name":"userId","in":"path","description":"User ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/models.Session"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apihandlers.APIError"}}}}},"security":[{"Bearer":[]}]}}},"components":{"schemas":{"apihandlers.APIError":{"type":"object","properties":{"message":{"type":"string"}}},"models.ClassifySessionRequest":{"type":"object","properties":{"classes":{"type":"array","items":{"type":"string"}},"last_n":{"type":"integer"},"name":{"type":"string"},"persist":{"type":"boolean"},"session_id":{"type":"string"}}},"models.ClassifySessionResponse":{"type":"object","properties":{"class":{"type":"string"},"name":{"type":"string"}}},"models.CreateDocumentCollectionRequest":{"required":["embedding_dimensions","is_auto_embedded","name"],"type":"object","properties":{"description":{"maxLength":1000,"type":"string"},"embedding_dimensions":{"maximum":2000,"minimum":8,"type":"integer"},"is_auto_embedded":{"type":"boolean","description":"these needs to be pointers so that we can distinguish between false and unset when validating"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"name":{"maxLength":40,"minLength":3,"type":"string"}}},"models.CreateDocumentRequest":{"type":"object","properties":{"content":{"type":"string"},"document_id":{"maxLength":100,"type":"string"},"embedding":{"type":"array","items":{"type":"number"}},"metadata":{"type":"object","additionalProperties":{"type":"object"}}}},"models.CreateSessionRequest":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"object"}},"session_id":{"type":"string"},"user_id":{"type":"string","description":"Must be a pointer to allow for null values"}}},"models.CreateUserRequest":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"user_id":{"type":"string"}}},"models.DocumentCollectionResponse":{"type":"object","properties":{"created_at":{"type":"string"},"description":{"type":"string"},"document_count":{"type":"integer","description":"Number of documents in the collection"},"document_embedded_count":{"type":"integer","description":"Number of documents with embeddings"},"embedding_dimensions":{"type":"integer"},"embedding_model_name":{"type":"string"},"is_auto_embedded":{"type":"boolean"},"is_indexed":{"type":"boolean"},"is_normalized":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"name":{"type":"string"},"updated_at":{"type":"string"},"uuid":{"type":"string"}}},"models.DocumentResponse":{"type":"object","properties":{"content":{"type":"string"},"created_at":{"type":"string"},"document_id":{"type":"string"},"embedding":{"type":"array","items":{"type":"number"}},"is_embedded":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"updated_at":{"type":"string"},"uuid":{"type":"string"}}},"models.DocumentSearchPayload":{"type":"object","properties":{"collection_name":{"type":"string"},"embedding":{"type":"array","items":{"type":"number"}},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"min_score":{"type":"number","description":"TODO: implement for documents"},"mmr_lambda":{"type":"number"},"search_type":{"$ref":"#/components/schemas/models.SearchType"},"text":{"type":"string"}}},"models.DocumentSearchResult":{"type":"object","properties":{"content":{"type":"string"},"created_at":{"type":"string"},"document_id":{"type":"string"},"embedding":{"type":"array","items":{"type":"number"}},"is_embedded":{"type":"boolean"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"score":{"type":"number"},"updated_at":{"type":"string"},"uuid":{"type":"string"}}},"models.DocumentSearchResultPage":{"type":"object","properties":{"current_page":{"type":"integer"},"query_vector":{"type":"array","items":{"type":"number"}},"result_count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/models.DocumentSearchResult"}},"total_pages":{"type":"integer"}}},"models.GetDocumentListRequest":{"type":"object","properties":{"document_ids":{"type":"array","items":{"type":"string"}},"uuids":{"type":"array","items":{"type":"string"}}}},"models.Memory":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/models.Message"}},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"summary":{"$ref":"#/components/schemas/models.Summary"}}},"models.MemorySearchPayload":{"type":"object","properties":{"embedding":{"type":"array","items":{"type":"number"}},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"min_score":{"type":"number"},"mmr_lambda":{"type":"number"},"search_scope":{"$ref":"#/components/schemas/models.SearchScope"},"search_type":{"$ref":"#/components/schemas/models.SearchType"},"text":{"type":"string"}}},"models.MemorySearchResult":{"type":"object","properties":{"embedding":{"type":"array","items":{"type":"number"}},"message":{"$ref":"#/components/schemas/models.Message"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"score":{"type":"number"},"summary":{"$ref":"#/components/schemas/models.Summary"}}},"models.Message":{"type":"object","properties":{"content":{"type":"string"},"created_at":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"role":{"type":"string"}, "role_type": {"type": "string"},"token_count":{"type":"integer"},"updated_at":{"type":"string"},"uuid":{"type":"string"}}},"models.Question":{"type":"object","properties":{"question":{"type":"string"}}},"models.SearchScope":{"type":"string","enum":["messages","summary"],"x-enum-varnames":["SearchScopeMessages","SearchScopeSummary"]},"models.SearchType":{"type":"string","enum":["similarity","mmr"],"x-enum-varnames":["SearchTypeSimilarity","SearchTypeMMR"]},"models.Session":{"type":"object","properties":{"created_at":{"type":"string"},"deleted_at":{"type":"string"},"id":{"type":"integer"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"project_uuid":{"type":"string"},"session_id":{"type":"string"},"updated_at":{"type":"string"},"user_id":{"type":"string","description":"Must be a pointer to allow for null values"},"uuid":{"type":"string"}}},"models.Summary":{"type":"object","properties":{"content":{"type":"string"},"created_at":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"related_message_uuids":{"type":"array","items":{"type":"string"}},"token_count":{"type":"integer"},"uuid":{"type":"string"}}},"models.SummaryListResponse":{"type":"object","properties":{"row_count":{"type":"integer"},"summaries":{"type":"array","items":{"$ref":"#/components/schemas/models.Summary"}},"total_count":{"type":"integer"}}},"models.UpdateDocumentCollectionRequest":{"type":"object","properties":{"description":{"maxLength":1000,"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}}}},"models.UpdateDocumentListRequest":{"required":["uuid"],"type":"object","properties":{"document_id":{"maxLength":40,"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"uuid":{"type":"string"}}},"models.UpdateDocumentRequest":{"type":"object","properties":{"document_id":{"maxLength":40,"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}}}},"models.UpdateSessionRequest":{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{"type":"object"}},"session_id":{"type":"string"}}},"models.UpdateUserRequest":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"user_id":{"type":"string"},"uuid":{"type":"string"}}},"models.User":{"type":"object","properties":{"created_at":{"type":"string"},"deleted_at":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"integer"},"last_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"project_uuid":{"type":"string"},"session_count":{"type":"integer"},"updated_at":{"type":"string"},"user_id":{"type":"string"},"uuid":{"type":"string"}}}},"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Api-Key\" followed by a space and JWT token.","name":"Authorization","in":"header"}}},"x-original-swagger-version":"2.0"} \ No newline at end of file +{ + "openapi": "3.0.1", + "info": { "title": "Zep Cloud API", "contact": {}, "version": "0.x" }, + "servers": [{ "url": "https://app.getzep.com/api/v2" }], + "paths": { + "/api/v2/collections/{collectionName}/documents/uuid/{documentUUID}": { + "patch": { + "tags": ["document"], + "summary": "Updates a Document in a DocumentCollection by UUID", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "documentUUID", + "in": "path", + "description": "UUID of the Document to be updated", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document to be updated", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.UpdateDocumentRequest" } } + }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "document" + } + }, + "/collection/{collectionName}/documents/uuid/{documentUUID}": { + "get": { + "tags": ["document"], + "summary": "Gets a Document from a DocumentCollection by UUID", + "description": "Returns specified Document from a DocumentCollection.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "documentUUID", + "in": "path", + "description": "UUID of the Document to be updated", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.DocumentResponse" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/collections": { + "get": { + "tags": ["collection"], + "summary": "Gets a list of DocumentCollections", + "description": "Returns a list of all DocumentCollections.", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { "$ref": "#/components/schemas/models.DocumentCollectionResponse" } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/collections/{collectionName}": { + "get": { + "tags": ["collection"], + "summary": "Gets a DocumentCollection", + "description": "Returns a DocumentCollection if it exists.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.DocumentCollectionResponse" } } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "post": { + "tags": ["collection"], + "summary": "Creates a new DocumentCollection", + "description": "If a collection with the same name already exists, an error will be returned.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document Collection", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.CreateDocumentCollectionRequest" } } + }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "collection" + }, + "delete": { + "tags": ["collection"], + "summary": "Deletes a DocumentCollection", + "description": "If a collection with the same name already exists, it will be overwritten.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "patch": { + "tags": ["collection"], + "summary": "Updates a DocumentCollection", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Document Collection", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.UpdateDocumentCollectionRequest" } } + }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "collection" + } + }, + "/collections/{collectionName}/document": { + "post": { + "tags": ["document"], + "summary": "Creates Multiple Documents in a DocumentCollection", + "description": "Creates Documents in a specified DocumentCollection and returns their UUIDs.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Array of Documents to be created", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.CreateDocumentRequest" } } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "documents" + } + }, + "/collections/{collectionName}/documents/batchDelete": { + "post": { + "tags": ["document"], + "summary": "Batch Deletes Documents from a DocumentCollection by UUID", + "description": "Deletes specified Documents from a DocumentCollection.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "UUIDs of the Documents to be deleted", + "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "documentUUIDs" + } + }, + "/collections/{collectionName}/documents/batchGet": { + "post": { + "tags": ["document"], + "summary": "Batch Gets Documents from a DocumentCollection", + "description": "Returns Documents from a DocumentCollection specified by UUID or ID.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "UUIDs and IDs of the Documents to be fetched", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.GetDocumentListRequest" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "type": "array", "items": { "$ref": "#/components/schemas/models.DocumentResponse" } } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "documentRequest" + } + }, + "/collections/{collectionName}/documents/batchUpdate": { + "patch": { + "tags": ["document"], + "summary": "Batch Updates Documents in a DocumentCollection", + "description": "Updates Documents in a specified DocumentCollection.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Array of Documents to be updated", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/models.UpdateDocumentListRequest" } + } + } + }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "documents" + } + }, + "/collections/{collectionName}/documents/uuid/{documentUUID}": { + "delete": { + "tags": ["document"], + "summary": "Delete Document from a DocumentCollection by UUID", + "description": "Delete specified Document from a DocumentCollection.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "documentUUID", + "in": "path", + "description": "UUID of the Document to be deleted", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Document Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/collections/{collectionName}/index/create": { + "post": { + "tags": ["collection"], + "summary": "Creates an index for a DocumentCollection", + "description": "Creates an index for the specified DocumentCollection to improve query performance.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "force", + "in": "query", + "description": "Force index creation, even if there are too few documents to index", + "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/collections/{collectionName}/search": { + "post": { + "tags": ["document"], + "summary": "Searches Documents in a DocumentCollection", + "description": "Searches Documents in a DocumentCollection based on provided search criteria.", + "parameters": [ + { + "name": "collectionName", + "in": "path", + "description": "Name of the Document Collection", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of returned documents", + "schema": { "type": "integer" } + } + ], + "requestBody": { + "description": "Search criteria", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.DocumentSearchPayload" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.DocumentSearchResultPage" } } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "401": { + "description": "Unauthorized", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "searchPayload" + } + }, + "/sessions": { + "get": { + "tags": ["session"], + "summary": "Returns all sessions", + "description": "Get all sessions with optional limit and cursor for pagination.", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Limit the number of results returned", + "schema": { "type": "integer" } + }, + { "name": "cursor", "in": "query", "description": "Cursor for pagination", "schema": { "type": "integer" } } + ], + "responses": { + "200": { + "description": "List of sessions", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.Session" } } + } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "post": { + "tags": ["session"], + "summary": "Add a session", + "description": "add session by id", + "requestBody": { + "description": "Session", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.CreateSessionRequest" } } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Session" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "session" + } + }, + "/sessions/{sessionId}": { + "get": { + "tags": ["session"], + "summary": "Returns a session by ID", + "description": "get session by id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Session" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "patch": { + "tags": ["session"], + "summary": "Add a session", + "description": "add session by id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Session", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.UpdateSessionRequest" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Session" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "session" + } + }, + "/sessions/{sessionId}/classify": { + "post": { + "tags": ["session"], + "summary": "Classify a session", + "description": "classify a session by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Classify request", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.ClassifySessionRequest" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.ClassifySessionResponse" } } + } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "classifyRequest" + } + }, + "/sessions/{sessionId}/memory": { + "get": { + "tags": ["memory"], + "summary": "Returns a memory (latest summary and list of messages) for a given session", + "description": "get memory by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "memoryType", + "in": "query", + "description": "memoryType: perpetual or message_window", + "schema": { "type": "string" } + }, + { + "name": "lastn", + "in": "query", + "description": "Last N messages. Overrides memory_window configuration", + "schema": { "type": "integer" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.Memory" } } + } + } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "post": { + "tags": ["memory"], + "summary": "Add memory messages to a given session", + "description": "add memory messages by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Memory messages", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Memory" } } }, + "required": true + }, + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "memoryMessages" + }, + "delete": { + "tags": ["memory"], + "summary": "Delete memory messages for a given session", + "description": "delete memory messages by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/sessions/{sessionId}/messages": { + "get": { + "tags": ["messages"], + "summary": "Retrieves all messages for a specific session", + "description": "get messages by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.Message" } } + } + } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + } + } + }, + "/sessions/{sessionId}/messages/{messageId}": { + "get": { + "tags": ["messages"], + "summary": "Retrieves a specific message", + "description": "get message by session id and message id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "messageId", + "in": "path", + "description": "Message ID", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Message" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + } + }, + "patch": { + "tags": ["messages"], + "summary": "Updates the metadata of a specific message", + "description": "update message metadata by session id and message id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "messageId", + "in": "path", + "description": "Message ID", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "New Metadata", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Message" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Message" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "x-codegen-request-body-name": "body" + } + }, + "/sessions/{sessionId}/search": { + "post": { + "tags": ["search"], + "summary": "Search memory messages for a given session", + "description": "search memory messages by session id and query", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "limit", + "in": "query", + "description": "Limit the number of results returned", + "schema": { "type": "integer" } + } + ], + "requestBody": { + "description": "Search query", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.MemorySearchPayload" } } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.MemorySearchResult" } } + } + } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "searchPayload" + } + }, + "/sessions/{sessionId}/summaries": { + "get": { + "tags": ["session"], + "summary": "Returns a session's summaries by ID", + "description": "Get session summaries by ID", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/models.SummaryListResponse" } } + } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/sessions/{sessionId}/synthesize_question": { + "get": { + "tags": ["memory"], + "summary": "Synthesize a question for a given session", + "description": "synthesize a question by session id", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "Session ID", + "required": true, + "schema": { "type": "string" } + }, + { "name": "lastNMessages", "in": "query", "description": "Last N messages", "schema": { "type": "integer" } } + ], + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.Question" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/user": { + "get": { + "tags": ["user"], + "summary": "List all users", + "description": "List all users with pagination.", + "parameters": [ + { + "name": "pageNumber", + "in": "query", + "description": "Page number for pagination, starting from 1", + "schema": { "type": "integer" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Number of users to retrieve per page", + "schema": { "type": "integer" } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved list of users", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.User" } } + } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "post": { + "tags": ["user"], + "summary": "Add a user", + "description": "add user by id", + "requestBody": { + "description": "User", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.CreateUserRequest" } } }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.User" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "user" + } + }, + "/users-ordered": { + "get": { + "tags": ["user"], + "summary": "List all users", + "description": "list all users", + "parameters": [ + { "name": "limit", "in": "query", "description": "Limit", "schema": { "type": "integer" } }, + { "name": "cursor", "in": "query", "description": "Cursor", "schema": { "type": "integer" } } + ], + "responses": { + "200": { + "description": "Successfully retrieved list of users", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { "type": "array", "items": { "$ref": "#/components/schemas/models.User" } } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + }, + "/users/{userId}": { + "get": { + "tags": ["user"], + "summary": "Returns a user by ID", + "description": "get user by id", + "parameters": [ + { "name": "userId", "in": "path", "description": "User ID", "required": true, "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.User" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "delete": { + "tags": ["user"], + "summary": "Delete a user", + "description": "delete user by id", + "parameters": [ + { "name": "userId", "in": "path", "description": "User ID", "required": true, "schema": { "type": "string" } } + ], + "responses": { + "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "string" } } } }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + }, + "patch": { + "tags": ["user"], + "summary": "Update a user", + "description": "update user by id", + "parameters": [ + { "name": "userId", "in": "path", "description": "User ID", "required": true, "schema": { "type": "string" } } + ], + "requestBody": { + "description": "User", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.UpdateUserRequest" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/models.User" } } } + }, + "400": { + "description": "Bad Request", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "404": { + "description": "Not Found", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }], + "x-codegen-request-body-name": "user" + } + }, + "/users/{userId}/sessions": { + "get": { + "tags": ["user"], + "summary": "List all sessions for a user", + "description": "list all sessions for a user by user id", + "parameters": [ + { "name": "userId", "in": "path", "description": "User ID", "required": true, "schema": { "type": "string" } } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "type": "array", "items": { "$ref": "#/components/schemas/models.Session" } } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/apihandlers.APIError" } } } + } + }, + "security": [{ "Bearer": [] }] + } + } + }, + "components": { + "schemas": { + "apihandlers.APIError": { "type": "object", "properties": { "message": { "type": "string" } } }, + "models.ClassifySessionRequest": { + "type": "object", + "properties": { + "classes": { "type": "array", "items": { "type": "string" } }, + "last_n": { "type": "integer" }, + "name": { "type": "string" }, + "persist": { "type": "boolean" }, + "session_id": { "type": "string" } + } + }, + "models.ClassifySessionResponse": { + "type": "object", + "properties": { "class": { "type": "string" }, "name": { "type": "string" } } + }, + "models.CreateDocumentCollectionRequest": { + "required": ["embedding_dimensions", "is_auto_embedded", "name"], + "type": "object", + "properties": { + "description": { "maxLength": 1000, "type": "string" }, + "embedding_dimensions": { "maximum": 2000, "minimum": 8, "type": "integer" }, + "is_auto_embedded": { + "type": "boolean", + "description": "these needs to be pointers so that we can distinguish between false and unset when validating" + }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "name": { "maxLength": 40, "minLength": 3, "type": "string" } + } + }, + "models.CreateDocumentRequest": { + "type": "object", + "properties": { + "content": { "type": "string" }, + "document_id": { "maxLength": 100, "type": "string" }, + "embedding": { "type": "array", "items": { "type": "number" } }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } } + } + }, + "models.CreateSessionRequest": { + "type": "object", + "properties": { + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "session_id": { "type": "string" }, + "user_id": { "type": "string", "description": "Must be a pointer to allow for null values" } + } + }, + "models.CreateUserRequest": { + "type": "object", + "properties": { + "email": { "type": "string" }, + "first_name": { "type": "string" }, + "last_name": { "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "user_id": { "type": "string" } + } + }, + "models.DocumentCollectionResponse": { + "type": "object", + "properties": { + "created_at": { "type": "string" }, + "description": { "type": "string" }, + "document_count": { "type": "integer", "description": "Number of documents in the collection" }, + "document_embedded_count": { "type": "integer", "description": "Number of documents with embeddings" }, + "embedding_dimensions": { "type": "integer" }, + "embedding_model_name": { "type": "string" }, + "is_auto_embedded": { "type": "boolean" }, + "is_indexed": { "type": "boolean" }, + "is_normalized": { "type": "boolean" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "name": { "type": "string" }, + "updated_at": { "type": "string" }, + "uuid": { "type": "string" } + } + }, + "models.DocumentResponse": { + "type": "object", + "properties": { + "content": { "type": "string" }, + "created_at": { "type": "string" }, + "document_id": { "type": "string" }, + "embedding": { "type": "array", "items": { "type": "number" } }, + "is_embedded": { "type": "boolean" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "updated_at": { "type": "string" }, + "uuid": { "type": "string" } + } + }, + "models.DocumentSearchPayload": { + "type": "object", + "properties": { + "collection_name": { "type": "string" }, + "embedding": { "type": "array", "items": { "type": "number" } }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "min_score": { "type": "number", "description": "TODO: implement for documents" }, + "mmr_lambda": { "type": "number" }, + "search_type": { "$ref": "#/components/schemas/models.SearchType" }, + "text": { "type": "string" } + } + }, + "models.DocumentSearchResult": { + "type": "object", + "properties": { + "content": { "type": "string" }, + "created_at": { "type": "string" }, + "document_id": { "type": "string" }, + "embedding": { "type": "array", "items": { "type": "number" } }, + "is_embedded": { "type": "boolean" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "score": { "type": "number" }, + "updated_at": { "type": "string" }, + "uuid": { "type": "string" } + } + }, + "models.DocumentSearchResultPage": { + "type": "object", + "properties": { + "current_page": { "type": "integer" }, + "query_vector": { "type": "array", "items": { "type": "number" } }, + "result_count": { "type": "integer" }, + "results": { "type": "array", "items": { "$ref": "#/components/schemas/models.DocumentSearchResult" } }, + "total_pages": { "type": "integer" } + } + }, + "models.GetDocumentListRequest": { + "type": "object", + "properties": { + "document_ids": { "type": "array", "items": { "type": "string" } }, + "uuids": { "type": "array", "items": { "type": "string" } } + } + }, + "models.Memory": { + "type": "object", + "properties": { + "messages": { "type": "array", "items": { "$ref": "#/components/schemas/models.Message" } }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "summary": { "$ref": "#/components/schemas/models.Summary" } + } + }, + "models.MemorySearchPayload": { + "type": "object", + "properties": { + "embedding": { "type": "array", "items": { "type": "number" } }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "min_score": { "type": "number" }, + "mmr_lambda": { "type": "number" }, + "search_scope": { "$ref": "#/components/schemas/models.SearchScope" }, + "search_type": { "$ref": "#/components/schemas/models.SearchType" }, + "text": { "type": "string" } + } + }, + "models.MemorySearchResult": { + "type": "object", + "properties": { + "embedding": { "type": "array", "items": { "type": "number" } }, + "message": { "$ref": "#/components/schemas/models.Message" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "score": { "type": "number" }, + "summary": { "$ref": "#/components/schemas/models.Summary" } + } + }, + "models.Message": { + "type": "object", + "properties": { + "content": { "type": "string" }, + "created_at": { "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "role": { "type": "string" }, + "role_type": { "type": "string" }, + "token_count": { "type": "integer" }, + "updated_at": { "type": "string" }, + "uuid": { "type": "string" } + } + }, + "models.Question": { "type": "object", "properties": { "question": { "type": "string" } } }, + "models.SearchScope": { + "type": "string", + "enum": ["messages", "summary"], + "x-enum-varnames": ["SearchScopeMessages", "SearchScopeSummary"] + }, + "models.SearchType": { + "type": "string", + "enum": ["similarity", "mmr"], + "x-enum-varnames": ["SearchTypeSimilarity", "SearchTypeMMR"] + }, + "models.Session": { + "type": "object", + "properties": { + "created_at": { "type": "string" }, + "deleted_at": { "type": "string" }, + "id": { "type": "integer" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "project_uuid": { "type": "string" }, + "session_id": { "type": "string" }, + "updated_at": { "type": "string" }, + "user_id": { "type": "string", "description": "Must be a pointer to allow for null values" }, + "uuid": { "type": "string" } + } + }, + "models.Summary": { + "type": "object", + "properties": { + "content": { "type": "string" }, + "created_at": { "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "related_message_uuids": { "type": "array", "items": { "type": "string" } }, + "token_count": { "type": "integer" }, + "uuid": { "type": "string" } + } + }, + "models.SummaryListResponse": { + "type": "object", + "properties": { + "row_count": { "type": "integer" }, + "summaries": { "type": "array", "items": { "$ref": "#/components/schemas/models.Summary" } }, + "total_count": { "type": "integer" } + } + }, + "models.UpdateDocumentCollectionRequest": { + "type": "object", + "properties": { + "description": { "maxLength": 1000, "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } } + } + }, + "models.UpdateDocumentListRequest": { + "required": ["uuid"], + "type": "object", + "properties": { + "document_id": { "maxLength": 40, "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "uuid": { "type": "string" } + } + }, + "models.UpdateDocumentRequest": { + "type": "object", + "properties": { + "document_id": { "maxLength": 40, "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } } + } + }, + "models.UpdateSessionRequest": { + "type": "object", + "properties": { + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "session_id": { "type": "string" } + } + }, + "models.UpdateUserRequest": { + "type": "object", + "properties": { + "email": { "type": "string" }, + "first_name": { "type": "string" }, + "last_name": { "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "user_id": { "type": "string" }, + "uuid": { "type": "string" } + } + }, + "models.User": { + "type": "object", + "properties": { + "created_at": { "type": "string" }, + "deleted_at": { "type": "string" }, + "email": { "type": "string" }, + "first_name": { "type": "string" }, + "id": { "type": "integer" }, + "last_name": { "type": "string" }, + "metadata": { "type": "object", "additionalProperties": { "type": "object" } }, + "project_uuid": { "type": "string" }, + "session_count": { "type": "integer" }, + "updated_at": { "type": "string" }, + "user_id": { "type": "string" }, + "uuid": { "type": "string" } + } + } + }, + "securitySchemes": { + "Bearer": { + "type": "apiKey", + "description": "Type \"Api-Key\" followed by a space and JWT token.", + "name": "Authorization", + "in": "header" + } + } + }, + "x-original-swagger-version": "2.0" +} diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/projects.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/projects.mdx index 5c588f690b..f571308688 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/projects.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/projects.mdx @@ -2,31 +2,36 @@ slug: projects --- - -Projects encapsulate abstractions such as Users, Sessions, Memories, and Documents, and various settings. - This allows you to keep your data organized by service, environment (such as development or production), or any other criteria that makes sense for your use case. - + + Projects encapsulate abstractions such as Users, Sessions, Memories, and Documents, and various settings. This allows + you to keep your data organized by service, environment (such as development or production), or any other criteria + that makes sense for your use case. + ## Creating a Project + When you sign up for Zep, your first project is automatically created. You'll be asked to configure a few project-specific settings (details below). If you need more projects, you can create them anytime through the [Zep Web App](https://app.getzep.com/projects/create). - Create a new project + Create a new project ### Project Essentials -* Unique Project Name: Choose a unique name for your project. -* Description (Optional): Feel free to add a brief description of your project. -* Model Selection: Let us know which LLM you'll be using. We count tokens in Zep artifacts like Messages and Summaries to help you stay within your prompt token budget. Knowing your model choice ensures we use the correct tokenizer. + +- Unique Project Name: Choose a unique name for your project. +- Description (Optional): Feel free to add a brief description of your project. +- Model Selection: Let us know which LLM you'll be using. We count tokens in Zep artifacts like Messages and Summaries to help you stay within your prompt token budget. Knowing your model choice ensures we use the correct tokenizer. > **You can modify your project settings later from the Dashboard.** ## Message Window + The Message Window, also known as the Memory Window, is a project setting that specifies how many messages are retrieved in a `GetMemory` call. It's set to a default of `6` messages and, while not adjustable during the initial project setup, can be easily changed later through the dashboard. ## LLM Model Selection and Token Counting + Select the LLM you'll be using for your Assistant. We count tokens in Zep artifacts like Messages and Summaries to help you stay within your prompt token budget. Knowing your model choice ensures we use the correct tokenizer. @@ -34,4 +39,5 @@ Knowing your model choice ensures we use the correct tokenizer. Available options are `GPT 3.5 or 4 family` and `Llama2 and related`. ## API Keys -API keys are specific to each project. You can create multiple keys for a single project. + +API keys are specific to each project. You can create multiple keys for a single project. diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/question-synthesis.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/question-synthesis.mdx index 11902f06cc..600a062857 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/question-synthesis.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/question-synthesis.mdx @@ -3,27 +3,29 @@ title: Question Synthesis slug: question-synthesis --- -Users often respond to questions with single-word answers that don't offer much information for search. + +Users often respond to questions with single-word answers that don't offer much information for search. For example, a user may respond to a question about their favorite book with "Dune" or a question about their -dietary restrictions with "dairy". +dietary restrictions with "dairy". - Without context, many user messages lack information necessary to successfully embed - a search query, resulting in poor or irrelevant search results. + Without context, many user messages lack information necessary to successfully embed a search query, resulting in poor + or irrelevant search results. Zep provides a low-latency question synthesis API that can be used to generate a question from the current conversation context, using -the most recent message to center the question. The resulting question can be used to search over document Collections or +the most recent message to center the question. The resulting question can be used to search over document Collections or chat history Messages and Summaries. Zep's [Perpetual Memory](/chat-history-memory) uses this question synthesis functionality internally to ensure that Memories it returns are relevant and useful. -While it's possible to synthesize a question using a general purpose LLM, this is often a slow and inaccurate exercise. +While it's possible to synthesize a question using a general purpose LLM, this is often a slow and inaccurate exercise. Zep's private, fine-tuned models are designed to return results in hundreds of milliseconds. - Want to see Question Synthesis in action? Take a look at [Zep's LangService VectorStore example](https://github.com/getzep/zep-python/blob/main/examples/langchain-langserve/app/message_history_vector_store_chain.py). + Want to see Question Synthesis in action? Take a look at [Zep's LangService VectorStore + example](https://github.com/getzep/zep-python/blob/main/examples/langchain-langserve/app/message_history_vector_store_chain.py). @@ -50,6 +52,7 @@ user: Is it easy to find vegetarian or vegan food in Iceland? assistant: Yes, Reykjavik has several vegetarian and vegan-friendly restaurants. Do you have any dietary restrictions? user: Yes, dairy. ``` + ```Text Can the user eat dairy products? -``` \ No newline at end of file +``` diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/sdks.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/sdks.mdx index c8206500e0..242792c07d 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/sdks.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/sdks.mdx @@ -16,12 +16,14 @@ To install the Zep Python SDK with Zep Cloud support, you'll need to install a r ```Bash pip install --pre zep-python ``` + ```Bash poetry add zep-python@^2.0.0rc ``` + @@ -29,7 +31,6 @@ poetry add zep-python@^2.0.0rc To install the Zep JavaScript SDK with Zep Cloud support, please install a pre-release version tagged with `@next`. - @@ -37,24 +38,26 @@ To install the Zep JavaScript SDK with Zep Cloud support, please install a pre-r ```Bash npm install @getzep/zep-js@next ``` + ```Bash yarn add @getzep/zep-js@next ``` + ```Bash pnpm install @getzep/zep-js@next ``` + ## Initialize Client - @@ -66,18 +69,18 @@ API_KEY = os.environ.get('ZEP_API_KEY') zep = ZepClient(api_key=API_KEY) ``` + ```typescript import { ZepClient } from "@getzep/zep-js"; -API_KEY = process.env.ZEP_API_KEY +API_KEY = process.env.ZEP_API_KEY; -const zep = await ZepClient.init( - API_KEY, -); +const zep = await ZepClient.init(API_KEY); ``` + @@ -88,12 +91,13 @@ const zep = await ZepClient.init( **The Python SDK Supports Async Use** - All methods are available as both sync and async, with the async methods prefixed with `a`. +All methods are available as both sync and async, with the async methods prefixed with `a`. For example, zep-python - has both `zep_client.memory.add_memory` and `zep_client.memory.aadd_memory` methods. - +has both `zep_client.memory.add_memory` and `zep_client.memory.aadd_memory` methods. + + ## LangChain @@ -111,6 +115,7 @@ Import the classes as shown below: ```python from zep_python.langchain import ZepChatMessageHistory, ZepVectorStore ``` + @@ -127,8 +132,9 @@ npm install langchain To import these classes, use the following syntax: ```typescript -import { ZepChatMessageHistory, ZepVectorStore } from "@getzep/zep-js/langchain" +import { ZepChatMessageHistory, ZepVectorStore } from "@getzep/zep-js/langchain"; ``` + @@ -138,7 +144,3 @@ import { ZepChatMessageHistory, ZepVectorStore } from "@getzep/zep-js/langchain" ## LlamaIndex Stay tuned! We are in the process of updating our LlamaIndex integration to be compatible with the latest Zep API. - - - - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/users.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/users.mdx index df38162422..ada2b868ef 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/users.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/users.mdx @@ -19,6 +19,7 @@ In the following sections, you will learn how to manage Users and their associat By associating a User with a Session, you can delete all Sessions and session artifacts associated with a User with a single API call. + ## The User model @@ -34,6 +35,7 @@ You can associate rich business context with a User: ## Adding a User You can add a new user by providing the user details. + @@ -53,32 +55,34 @@ user_request = CreateUserRequest( ) new_user = client.user.add(user_request) ``` + ```typescript -import { ZepClient, CreateUserRequest, UpdateUserRequest } from '@getzep/zep-js'; +import { ZepClient, CreateUserRequest, UpdateUserRequest } from "@getzep/zep-js"; const client: ZepClient = await ZepClient.init(API_KEY); const user_request: CreateUserRequest = { - userId: user_id, - email: "user@example.com", - firstName: "Jane", - lastName: "Smith", - metadata: { foo: "bar" }, + userId: user_id, + email: "user@example.com", + firstName: "Jane", + lastName: "Smith", + metadata: { foo: "bar" }, }; const new_user = await client.user.add(user_request); ``` + - > Learn how to associate [Sessions with Users](chat-history-memory/sessions.mdx) ## Getting a User You can retrieve a user by their ID. + @@ -86,19 +90,21 @@ You can retrieve a user by their ID. ```python user = client.user.get("user123") ``` + ```typescript -const user = await client.user.get("user123") +const user = await client.user.get("user123"); ``` + - ## Updating a User You can update a user's details by providing the updated user details. + @@ -114,27 +120,29 @@ user_request = UpdateUserRequest( updated_user = client.user.update(user_request) ``` + ```typescript const user_request: UpdateUserRequest = { - userId: user_id, - email: "updated_user@example.com", - firstName: "Jane", - lastName: "Smith", - metadata: { foo: "updated_bar" }, + userId: user_id, + email: "updated_user@example.com", + firstName: "Jane", + lastName: "Smith", + metadata: { foo: "updated_bar" }, }; const updated_user = await client.user.update(user_request); ``` + - ## Deleting a User You can delete a user by their ID. + @@ -142,16 +150,17 @@ You can delete a user by their ID. ```python client.user.delete("user123") ``` + ```typescript -await client.user.delete("user123") +await client.user.delete("user123"); ``` + - ## Getting a User's Sessions You can retrieve all Sessions for a user by their ID. @@ -162,19 +171,21 @@ You can retrieve all Sessions for a user by their ID. ```python sessions = client.user.get_sessions("user123") ``` + ```typescript -const sessions = await client.user.getSessions("user123") +const sessions = await client.user.getSessions("user123"); ``` + - ## Listing Users You can list all users, with optional limit and cursor parameters for pagination. + @@ -183,21 +194,23 @@ You can list all users, with optional limit and cursor parameters for pagination # List the first 10 users users = client.user.list(limit=10, cursor=0) ``` + ```typescript // List the first 10 users -const users = await client.user.list(10, 0) +const users = await client.user.list(10, 0); ``` + - ## Listing Users in Chunks You can retrieve users in chunks of a specified size. This is a generator function that yields each chunk of users as they are retrieved. + @@ -205,16 +218,16 @@ they are retrieved. for users in client.user.list_chunked(chunkSize=100): process(users) ``` + ```typescript for await (const chunk of client.user.listChunked(100)) { - // Process each chunk of users - await processChunk(chunk); + // Process each chunk of users + await processChunk(chunk); } ``` + - - diff --git a/clis/docs-migrator/src/__test__/outputs/zep/fern/working-with-search.mdx b/clis/docs-migrator/src/__test__/outputs/zep/fern/working-with-search.mdx index 875ed80984..777b777499 100644 --- a/clis/docs-migrator/src/__test__/outputs/zep/fern/working-with-search.mdx +++ b/clis/docs-migrator/src/__test__/outputs/zep/fern/working-with-search.mdx @@ -5,14 +5,14 @@ slug: working-with-search - Zep's Collection and Memory search supports semantic similarity search and similarity search re-ranked by [Maximal Marginal Relevance](#maximal-marginal-relevance-re-ranking). - Both of these search types can be filtered by JSONPath-based metadata filters. Memory search also supports querying by message or summary creation date. + Zep's Collection and Memory search supports semantic similarity search and similarity search re-ranked by [Maximal + Marginal Relevance](#maximal-marginal-relevance-re-ranking). Both of these search types can be filtered by + JSONPath-based metadata filters. Memory search also supports querying by message or summary creation date. - ## Simple, Text-based Semantic Queries -The simplest form of search query is a text-based semantic simailrity query. No metadata filter is required, and the query is simply a string of text. +The simplest form of search query is a text-based semantic simailrity query. No metadata filter is required, and the query is simply a string of text. Zep will convert the query into an embedding and find semantically similar documents, chat history summaries, or chat messages. Below is an example search against a chat session using only search text. @@ -33,7 +33,7 @@ search_payload = MemorySearchPayload( search_scope="messages", metadata={"where": {"jsonpath": '$[*] ? (@.bar == "foo")'}}, ) - + search_results = await client.memory.search_memory(session_id, search_payload) ``` @@ -47,9 +47,9 @@ import { ZepClient, MemorySearchPayload } from "@getzep/zep-js"; const zepClient = await ZepClient.init(process.env.ZEP_API_KEY); const searchPayload = new MemorySearchPayload({ - text: query, - search_scope: "messages", - metadata: { where: { jsonpath: '$[*] ? (@.bar == "foo")' } } + text: query, + search_scope: "messages", + metadata: { where: { jsonpath: '$[*] ? (@.bar == "foo")' } }, }); const searchResults = await client.memory.searchMemory(sessionId, searchPayload); @@ -58,8 +58,6 @@ const searchResults = await client.memory.searchMemory(sessionId, searchPayload) - - Read more about [chat message history search](chat-history-memory/search.mdx). ## Maximal Marginal Relevance Re-Ranking @@ -85,8 +83,6 @@ Zep's MMR algorithm is SIMD-hardware accelerated on `amd64` archicture CPUs, ens

Constructing an MMR Re-Ranked Search Query

- - #### MMR Search over Chat History @@ -123,10 +119,10 @@ import { ZepClient, MemorySearchPayload } from "@getzep/zep-js"; const zepClient = await ZepClient.init(process.env.ZEP_API_KEY); const searchPayload = new MemorySearchPayload({ - text: query, - search_scope: "summary", // This could be messages or summary - search_type: "mmr", - mmrLambda: 0.5, // tune diversity vs relevance + text: query, + search_scope: "summary", // This could be messages or summary + search_type: "mmr", + mmrLambda: 0.5, // tune diversity vs relevance }); const searchResults = await client.memory.searchMemory(sessionId, searchPayload, 3); @@ -135,7 +131,6 @@ const searchResults = await client.memory.searchMemory(sessionId, searchPayload, - #### MMR Search over Document Collections @@ -158,11 +153,14 @@ docs = collection.search( ```typescript // This assumes you've created a collection and added documents to it -const docs = await collection.search({ +const docs = await collection.search( + { text: query, search_type: "mmr", mmr_lambda: 0.5, -}, 3); + }, + 3, +); ``` @@ -175,6 +173,7 @@ Zep supports filtering search queries by metadata. Metadata filters are [JSONPat JSONPath queries allow for building sophisticated filters that match on elements at any level of the JSON document. The boolean logic overlay allows for combining multiple JSONPath queries using `and` and `or` operators. ### Useful resources for building and testing JSONPath queries + - [JSONPath Syntax](https://goessner.net/articles/JsonPath/) - [JSONPath Online Evaluator](https://jsonpath.com/) - [JSONPath Expression Tester](https://jsonpath.curiousconcept.com/#). @@ -196,7 +195,6 @@ Executing the above query against a chat session looks as follows: - ```python search_payload = MemorySearchPayload( text="Is Lauren Olamina a character in a book", @@ -216,17 +214,16 @@ search_results = client.memory.search_memory(session_id, search_payload) ```typescript const searchPayload = new MemorySearchPayload({ - text: "Is Lauren Olamina a character in a book", - metadata: { where: { jsonpath: '$[*] ? (@.author == "Octavia Butler")' } } + text: "Is Lauren Olamina a character in a book", + metadata: { where: { jsonpath: '$[*] ? (@.author == "Octavia Butler")' } }, }); -const search_results = await client.memory.searchMemory(session_id, search_payload) +const search_results = await client.memory.searchMemory(session_id, search_payload); ``` - ### Combining multiple JSONPath filters using boolean logic Multiple JSONPath queries can be combined using boolean logic. The following example will return documents or messages where the `author` field is equal to `"Octavia Butler"` **and** the `title` field is equal to `"Parable of the Sower"`. diff --git a/packages/generator-cli/.depcheckrc.json b/clis/generator-cli/.depcheckrc.json similarity index 100% rename from packages/generator-cli/.depcheckrc.json rename to clis/generator-cli/.depcheckrc.json diff --git a/packages/generator-cli/.env-cmdrc.cjs b/clis/generator-cli/.env-cmdrc.cjs similarity index 100% rename from packages/generator-cli/.env-cmdrc.cjs rename to clis/generator-cli/.env-cmdrc.cjs diff --git a/packages/generator-cli/.mrlint.json b/clis/generator-cli/.mrlint.json similarity index 100% rename from packages/generator-cli/.mrlint.json rename to clis/generator-cli/.mrlint.json diff --git a/packages/generator-cli/.prettierrc.cjs b/clis/generator-cli/.prettierrc.cjs similarity index 100% rename from packages/generator-cli/.prettierrc.cjs rename to clis/generator-cli/.prettierrc.cjs diff --git a/packages/generator-cli/package.json b/clis/generator-cli/package.json similarity index 86% rename from packages/generator-cli/package.json rename to clis/generator-cli/package.json index dce9936900..5af34cccad 100644 --- a/packages/generator-cli/package.json +++ b/clis/generator-cli/package.json @@ -12,8 +12,8 @@ }, "scripts": { "clean": "rm -rf ./dist && tsc --build --clean", - "dist:cli": "tsup ./src/cli.ts --format cjs && echo '#!/usr/bin/env node' | cat - dist/cli.cjs > dist/tmp && mv dist/tmp dist/cli.cjs", - "test": "vitest --passWithNoTests --globals --disable-console-intercept", + "compile": "tsup ./src/cli.ts --format cjs && echo '#!/usr/bin/env node' | cat - dist/cli.cjs > dist/tmp && mv dist/tmp dist/cli.cjs", + "test": "vitest --run --passWithNoTests --globals --disable-console-intercept", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/generator-cli/src/__test__/__snapshots__/basic-go.test.ts.snap b/clis/generator-cli/src/__test__/__snapshots__/basic-go.test.ts.snap similarity index 100% rename from packages/generator-cli/src/__test__/__snapshots__/basic-go.test.ts.snap rename to clis/generator-cli/src/__test__/__snapshots__/basic-go.test.ts.snap diff --git a/packages/generator-cli/src/__test__/__snapshots__/cohere-go-merged.test.ts.snap b/clis/generator-cli/src/__test__/__snapshots__/cohere-go-merged.test.ts.snap similarity index 100% rename from packages/generator-cli/src/__test__/__snapshots__/cohere-go-merged.test.ts.snap rename to clis/generator-cli/src/__test__/__snapshots__/cohere-go-merged.test.ts.snap diff --git a/packages/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap b/clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap similarity index 100% rename from packages/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap rename to clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap diff --git a/packages/generator-cli/src/__test__/__snapshots__/empty-go.test.ts.snap b/clis/generator-cli/src/__test__/__snapshots__/empty-go.test.ts.snap similarity index 100% rename from packages/generator-cli/src/__test__/__snapshots__/empty-go.test.ts.snap rename to clis/generator-cli/src/__test__/__snapshots__/empty-go.test.ts.snap diff --git a/packages/generator-cli/src/__test__/basic-go.test.ts b/clis/generator-cli/src/__test__/basic-go.test.ts similarity index 100% rename from packages/generator-cli/src/__test__/basic-go.test.ts rename to clis/generator-cli/src/__test__/basic-go.test.ts diff --git a/packages/generator-cli/src/__test__/cohere-go-merged.test.ts b/clis/generator-cli/src/__test__/cohere-go-merged.test.ts similarity index 100% rename from packages/generator-cli/src/__test__/cohere-go-merged.test.ts rename to clis/generator-cli/src/__test__/cohere-go-merged.test.ts diff --git a/packages/generator-cli/src/__test__/cohere-go.test.ts b/clis/generator-cli/src/__test__/cohere-go.test.ts similarity index 100% rename from packages/generator-cli/src/__test__/cohere-go.test.ts rename to clis/generator-cli/src/__test__/cohere-go.test.ts diff --git a/packages/generator-cli/src/__test__/empty-go.test.ts b/clis/generator-cli/src/__test__/empty-go.test.ts similarity index 100% rename from packages/generator-cli/src/__test__/empty-go.test.ts rename to clis/generator-cli/src/__test__/empty-go.test.ts diff --git a/packages/generator-cli/src/__test__/fixtures/basic-go/readme.json b/clis/generator-cli/src/__test__/fixtures/basic-go/readme.json similarity index 100% rename from packages/generator-cli/src/__test__/fixtures/basic-go/readme.json rename to clis/generator-cli/src/__test__/fixtures/basic-go/readme.json diff --git a/packages/generator-cli/src/__test__/fixtures/cohere-go-merged/README.md b/clis/generator-cli/src/__test__/fixtures/cohere-go-merged/README.md similarity index 100% rename from packages/generator-cli/src/__test__/fixtures/cohere-go-merged/README.md rename to clis/generator-cli/src/__test__/fixtures/cohere-go-merged/README.md diff --git a/packages/generator-cli/src/__test__/fixtures/cohere-go-merged/readme.json b/clis/generator-cli/src/__test__/fixtures/cohere-go-merged/readme.json similarity index 100% rename from packages/generator-cli/src/__test__/fixtures/cohere-go-merged/readme.json rename to clis/generator-cli/src/__test__/fixtures/cohere-go-merged/readme.json diff --git a/packages/generator-cli/src/__test__/fixtures/cohere-go/readme.json b/clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json similarity index 100% rename from packages/generator-cli/src/__test__/fixtures/cohere-go/readme.json rename to clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json diff --git a/packages/generator-cli/src/__test__/fixtures/empty-go/readme.json b/clis/generator-cli/src/__test__/fixtures/empty-go/readme.json similarity index 100% rename from packages/generator-cli/src/__test__/fixtures/empty-go/readme.json rename to clis/generator-cli/src/__test__/fixtures/empty-go/readme.json diff --git a/packages/generator-cli/src/__test__/testGenerateReadme.ts b/clis/generator-cli/src/__test__/testGenerateReadme.ts similarity index 100% rename from packages/generator-cli/src/__test__/testGenerateReadme.ts rename to clis/generator-cli/src/__test__/testGenerateReadme.ts diff --git a/packages/generator-cli/src/cli.ts b/clis/generator-cli/src/cli.ts similarity index 100% rename from packages/generator-cli/src/cli.ts rename to clis/generator-cli/src/cli.ts diff --git a/packages/generator-cli/src/configuration/generated/api/index.ts b/clis/generator-cli/src/configuration/generated/api/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/index.ts rename to clis/generator-cli/src/configuration/generated/api/index.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/index.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/index.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/index.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureConfig.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureConfig.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureConfig.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureConfig.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureId.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureId.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureId.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureId.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureSpec.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureSpec.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureSpec.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/types/FeatureSpec.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/types/StructuredFeatureId.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/types/StructuredFeatureId.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/types/StructuredFeatureId.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/types/StructuredFeatureId.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/feature/types/index.ts b/clis/generator-cli/src/configuration/generated/api/resources/feature/types/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/feature/types/index.ts rename to clis/generator-cli/src/configuration/generated/api/resources/feature/types/index.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/index.ts b/clis/generator-cli/src/configuration/generated/api/resources/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/index.ts rename to clis/generator-cli/src/configuration/generated/api/resources/index.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/index.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/index.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/index.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/CsharpInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/CsharpInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/CsharpInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/CsharpInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/GoInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/GoInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/GoInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/GoInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/GoPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/GoPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/GoPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/GoPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/JavaInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/JavaInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/JavaInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/JavaInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/LanguageInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/LanguageInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/LanguageInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/LanguageInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/MavenPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/MavenPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/MavenPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/MavenPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/NpmPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/NpmPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/NpmPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/NpmPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/NugetPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/NugetPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/NugetPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/NugetPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/PypiPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/PypiPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/PypiPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/PypiPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/PythonInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/PythonInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/PythonInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/PythonInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeFeature.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeFeature.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeFeature.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeFeature.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/RubyGemsPublishInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/RubyGemsPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/RubyGemsPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/RubyGemsPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/RubyInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/RubyInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/RubyInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/RubyInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/TypescriptInfo.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/TypescriptInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/TypescriptInfo.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/TypescriptInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/api/resources/readme/types/index.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/api/resources/readme/types/index.ts rename to clis/generator-cli/src/configuration/generated/api/resources/readme/types/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/index.ts b/clis/generator-cli/src/configuration/generated/core/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/index.ts rename to clis/generator-cli/src/configuration/generated/core/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/Schema.ts b/clis/generator-cli/src/configuration/generated/core/schemas/Schema.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/Schema.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/Schema.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/date/date.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/date/date.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/date/date.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/date/date.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/date/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/date/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/date/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/date/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/enum/enum.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/enum/enum.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/enum/enum.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/enum/enum.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/enum/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/enum/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/enum/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/enum/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazy.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazy.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazy.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazy.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazyObject.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazyObject.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazyObject.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/lazy/lazyObject.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/list/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/list/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/list/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/list/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/list/list.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/list/list.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/list/list.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/list/list.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/booleanLiteral.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/booleanLiteral.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/booleanLiteral.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/booleanLiteral.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/stringLiteral.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/stringLiteral.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/literals/stringLiteral.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/literals/stringLiteral.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/getObjectLikeUtils.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/getObjectLikeUtils.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/getObjectLikeUtils.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/getObjectLikeUtils.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/types.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/types.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object-like/types.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object-like/types.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object/object.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object/object.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object/object.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object/object.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object/objectWithoutOptionalProperties.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object/objectWithoutOptionalProperties.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object/objectWithoutOptionalProperties.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object/property.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object/property.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object/property.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object/property.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/object/types.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/object/types.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/object/types.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/object/types.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/any.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/any.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/any.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/any.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/boolean.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/boolean.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/boolean.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/boolean.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/number.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/number.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/number.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/number.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/string.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/string.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/string.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/string.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/unknown.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/unknown.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/primitives/unknown.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/primitives/unknown.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/record/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/record/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/record/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/record/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/record/record.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/record/record.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/record/record.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/record/record.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/record/types.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/record/types.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/record/types.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/record/types.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/JsonError.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/JsonError.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/JsonError.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/JsonError.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/ParseError.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/ParseError.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/ParseError.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/ParseError.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/getSchemaUtils.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/getSchemaUtils.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/getSchemaUtils.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/getSchemaUtils.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/stringifyValidationErrors.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/stringifyValidationErrors.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/stringifyValidationErrors.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/schema-utils/stringifyValidationErrors.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/set/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/set/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/set/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/set/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/set/set.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/set/set.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/set/set.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/set/set.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/types.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/types.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/types.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/types.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/union/discriminant.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/union/discriminant.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/union/discriminant.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/union/discriminant.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/union/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/union/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/union/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/union/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/union/types.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/union/types.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/union/types.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/union/types.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/builders/union/union.ts b/clis/generator-cli/src/configuration/generated/core/schemas/builders/union/union.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/builders/union/union.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/builders/union/union.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/index.ts b/clis/generator-cli/src/configuration/generated/core/schemas/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/index.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/index.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/MaybePromise.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/MaybePromise.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/MaybePromise.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/MaybePromise.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/addQuestionMarksToNullableProperties.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/addQuestionMarksToNullableProperties.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/addQuestionMarksToNullableProperties.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/addQuestionMarksToNullableProperties.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/createIdentitySchemaCreator.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/createIdentitySchemaCreator.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/createIdentitySchemaCreator.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/createIdentitySchemaCreator.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/entries.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/entries.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/entries.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/entries.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/filterObject.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/filterObject.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/filterObject.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/filterObject.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/getErrorMessageForIncorrectType.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/getErrorMessageForIncorrectType.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/getErrorMessageForIncorrectType.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/getErrorMessageForIncorrectType.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/isPlainObject.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/isPlainObject.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/isPlainObject.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/isPlainObject.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/keys.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/keys.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/keys.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/keys.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/maybeSkipValidation.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/maybeSkipValidation.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/maybeSkipValidation.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/maybeSkipValidation.ts diff --git a/packages/generator-cli/src/configuration/generated/core/schemas/utils/partition.ts b/clis/generator-cli/src/configuration/generated/core/schemas/utils/partition.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/core/schemas/utils/partition.ts rename to clis/generator-cli/src/configuration/generated/core/schemas/utils/partition.ts diff --git a/packages/generator-cli/src/configuration/generated/errors/FernGeneratorCliError.ts b/clis/generator-cli/src/configuration/generated/errors/FernGeneratorCliError.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/errors/FernGeneratorCliError.ts rename to clis/generator-cli/src/configuration/generated/errors/FernGeneratorCliError.ts diff --git a/packages/generator-cli/src/configuration/generated/errors/FernGeneratorCliTimeoutError.ts b/clis/generator-cli/src/configuration/generated/errors/FernGeneratorCliTimeoutError.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/errors/FernGeneratorCliTimeoutError.ts rename to clis/generator-cli/src/configuration/generated/errors/FernGeneratorCliTimeoutError.ts diff --git a/packages/generator-cli/src/configuration/generated/errors/index.ts b/clis/generator-cli/src/configuration/generated/errors/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/errors/index.ts rename to clis/generator-cli/src/configuration/generated/errors/index.ts diff --git a/packages/generator-cli/src/configuration/generated/index.ts b/clis/generator-cli/src/configuration/generated/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/index.ts rename to clis/generator-cli/src/configuration/generated/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/index.ts b/clis/generator-cli/src/configuration/generated/serialization/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/index.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureConfig.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureConfig.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureConfig.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureConfig.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureId.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureId.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureId.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureId.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureSpec.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureSpec.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureSpec.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/FeatureSpec.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/StructuredFeatureId.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/StructuredFeatureId.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/StructuredFeatureId.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/StructuredFeatureId.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/index.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/feature/types/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/feature/types/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/index.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/index.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/index.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/CsharpInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/CsharpInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/CsharpInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/CsharpInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/GoPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/JavaInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/JavaInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/JavaInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/JavaInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/LanguageInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/LanguageInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/LanguageInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/LanguageInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/MavenPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/MavenPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/MavenPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/MavenPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/NpmPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/NpmPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/NpmPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/NpmPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/NugetPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/NugetPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/NugetPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/NugetPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/PypiPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/PypiPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/PypiPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/PypiPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/PythonInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/PythonInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/PythonInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/PythonInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeFeature.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeFeature.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeFeature.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeFeature.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyGemsPublishInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyGemsPublishInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyGemsPublishInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyGemsPublishInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/RubyInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/TypescriptInfo.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/TypescriptInfo.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/TypescriptInfo.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/TypescriptInfo.ts diff --git a/packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/index.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/generated/serialization/resources/readme/types/index.ts rename to clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/index.ts diff --git a/packages/generator-cli/src/configuration/index.ts b/clis/generator-cli/src/configuration/index.ts similarity index 100% rename from packages/generator-cli/src/configuration/index.ts rename to clis/generator-cli/src/configuration/index.ts diff --git a/packages/generator-cli/src/configuration/loadReadmeConfig.ts b/clis/generator-cli/src/configuration/loadReadmeConfig.ts similarity index 100% rename from packages/generator-cli/src/configuration/loadReadmeConfig.ts rename to clis/generator-cli/src/configuration/loadReadmeConfig.ts diff --git a/packages/generator-cli/src/index.ts b/clis/generator-cli/src/index.ts similarity index 100% rename from packages/generator-cli/src/index.ts rename to clis/generator-cli/src/index.ts diff --git a/packages/generator-cli/src/readme/Block.ts b/clis/generator-cli/src/readme/Block.ts similarity index 100% rename from packages/generator-cli/src/readme/Block.ts rename to clis/generator-cli/src/readme/Block.ts diff --git a/packages/generator-cli/src/readme/BlockMerger.ts b/clis/generator-cli/src/readme/BlockMerger.ts similarity index 100% rename from packages/generator-cli/src/readme/BlockMerger.ts rename to clis/generator-cli/src/readme/BlockMerger.ts diff --git a/packages/generator-cli/src/readme/ReadmeGenerator.ts b/clis/generator-cli/src/readme/ReadmeGenerator.ts similarity index 100% rename from packages/generator-cli/src/readme/ReadmeGenerator.ts rename to clis/generator-cli/src/readme/ReadmeGenerator.ts diff --git a/packages/generator-cli/src/readme/ReadmeParser.ts b/clis/generator-cli/src/readme/ReadmeParser.ts similarity index 100% rename from packages/generator-cli/src/readme/ReadmeParser.ts rename to clis/generator-cli/src/readme/ReadmeParser.ts diff --git a/packages/generator-cli/src/readme/index.ts b/clis/generator-cli/src/readme/index.ts similarity index 100% rename from packages/generator-cli/src/readme/index.ts rename to clis/generator-cli/src/readme/index.ts diff --git a/packages/generator-cli/src/utils/Writer.ts b/clis/generator-cli/src/utils/Writer.ts similarity index 100% rename from packages/generator-cli/src/utils/Writer.ts rename to clis/generator-cli/src/utils/Writer.ts diff --git a/packages/generator-cli/tsconfig.json b/clis/generator-cli/tsconfig.json similarity index 100% rename from packages/generator-cli/tsconfig.json rename to clis/generator-cli/tsconfig.json diff --git a/packages/commons/core-utils/package.json b/packages/commons/core-utils/package.json index 1c1ebb3870..700c6271a7 100644 --- a/packages/commons/core-utils/package.json +++ b/packages/commons/core-utils/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/fdr-utils/package.json b/packages/commons/fdr-utils/package.json index 9763303671..cd7af9c5cc 100644 --- a/packages/commons/fdr-utils/package.json +++ b/packages/commons/fdr-utils/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/loadable/package.json b/packages/commons/loadable/package.json index 84cb325baa..9d5a6ec124 100644 --- a/packages/commons/loadable/package.json +++ b/packages/commons/loadable/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/react/common-components/package.json b/packages/commons/react/common-components/package.json index 186d50d94f..866aa91a5b 100644 --- a/packages/commons/react/common-components/package.json +++ b/packages/commons/react/common-components/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/react/fonts/package.json b/packages/commons/react/fonts/package.json index 968eef4ee8..781aa25c33 100644 --- a/packages/commons/react/fonts/package.json +++ b/packages/commons/react/fonts/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/react/react-commons/package.json b/packages/commons/react/react-commons/package.json index e4d1effb6f..f13d9d1e94 100644 --- a/packages/commons/react/react-commons/package.json +++ b/packages/commons/react/react-commons/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/commons/react/react-query-utils/package.json b/packages/commons/react/react-query-utils/package.json index 4f077c1cce..65a66e9926 100644 --- a/packages/commons/react/react-query-utils/package.json +++ b/packages/commons/react/react-query-utils/package.json @@ -18,7 +18,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/fdr-sdk/package.json b/packages/fdr-sdk/package.json index aa4b94d8d1..2ca6d4894c 100644 --- a/packages/fdr-sdk/package.json +++ b/packages/fdr-sdk/package.json @@ -54,6 +54,6 @@ "format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", "format:check": "prettier --check --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", "lint": "eslint --max-warnings 0 src --ext .ts --resolve-plugins-relative-to ../../", - "test": "vitest" + "test": "vitest --run" } } diff --git a/packages/healthchecks/package.json b/packages/healthchecks/package.json index 99e67b3a14..4abe4c129a 100644 --- a/packages/healthchecks/package.json +++ b/packages/healthchecks/package.json @@ -21,7 +21,7 @@ "scripts": { "clean": "rm -rf ./dist && tsc --build --clean", "dist:cli": "tsup ./src/cli.ts --format cjs", - "test": "vitest --passWithNoTests --globals --disable-console-intercept", + "test": "vitest --run --passWithNoTests --globals --disable-console-intercept", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index a6c3bac5ae..4449bb2b7c 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -21,7 +21,7 @@ "scripts": { "clean": "rm -rf ./dist && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"", diff --git a/packages/template-resolver/package.json b/packages/template-resolver/package.json index d0cbe999a9..34c7c5c1b2 100644 --- a/packages/template-resolver/package.json +++ b/packages/template-resolver/package.json @@ -25,7 +25,7 @@ "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", "lint:style:fix": "pnpm lint:style --fix", - "test": "vitest --passWithNoTests" + "test": "vitest --run --passWithNoTests" }, "dependencies": { "lodash-es": "^4.17.21" diff --git a/packages/ui/app/package.json b/packages/ui/app/package.json index 6e97b144a9..40228fd957 100644 --- a/packages/ui/app/package.json +++ b/packages/ui/app/package.json @@ -21,7 +21,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals --disable-console-intercept", + "test": "vitest --run --passWithNoTests --globals --disable-console-intercept", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/ui/app/src/util/__test__/dateUtils.test.ts b/packages/ui/app/src/util/__test__/dateUtils.test.ts deleted file mode 100644 index 1c2527d162..0000000000 --- a/packages/ui/app/src/util/__test__/dateUtils.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -import moment from "moment"; -import { Changelog } from "../dateUtils"; - -describe("Changelog.toShortDateString", () => { - it("should return the correct date", () => { - const timestamp = "2020-01-01T00:00:00Z"; - expect(Changelog.toShortDateString(timestamp)).toEqual("Jan 01 2020"); - }); - - it("should return the correct date for a different date", () => { - const timestamp = "2020-02-02T00:00:00Z"; - expect(Changelog.toShortDateString(timestamp)).toEqual("Feb 02 2020"); - }); - - it("should return the correct date even for the end of the day", () => { - const timestamp = "2020-02-02T23:59:59Z"; - expect(Changelog.toShortDateString(timestamp)).toEqual("Feb 02 2020"); - }); - - it("should return the correct date for a different timezone", () => { - const timestamp = "2020-02-02T00:00:00+01:00"; - expect(Changelog.toShortDateString(timestamp)).toEqual("Feb 02 2020"); - - const timestamp2 = "2020-02-02T00:00:00-01:00"; - expect(Changelog.toShortDateString(timestamp2)).toEqual("Feb 02 2020"); - - const timestamp3 = "2020-02-02T00:00:00+02:00"; - expect(Changelog.toShortDateString(timestamp3)).toEqual("Feb 02 2020"); - }); -}); - -describe("Changelog.toLongDateString", () => { - it("should return the correct date", () => { - const timestamp = "2020-01-01T00:00:00Z"; - expect(Changelog.toLongDateString(timestamp)).toEqual("January 1, 2020"); - }); - - it("should return the correct date for a different date", () => { - const timestamp = "2020-02-02T00:00:00Z"; - expect(Changelog.toLongDateString(timestamp)).toEqual("February 2, 2020"); - }); - - it("should return the correct date even for the end of the day", () => { - const timestamp = "2020-02-02T23:59:59Z"; - expect(Changelog.toLongDateString(timestamp)).toEqual("February 2, 2020"); - }); -}); - -describe("Changelog.toCalendarDate", () => { - it("should return 'today' for the same day", () => { - const timestamp = moment().toISOString(); - expect(Changelog.toCalendarDate(timestamp)).toEqual("today"); - }); - - it("should return 'tomorrow' for the next day", () => { - const timestamp = moment().add(1, "day").toISOString(); - expect(Changelog.toCalendarDate(timestamp)).toEqual("tomorrow"); - }); - - it("should return 'yesterday' for the previous day", () => { - const timestamp = moment().subtract(1, "day").toISOString(); - expect(Changelog.toCalendarDate(timestamp)).toEqual("yesterday"); - }); - - it("should return the day of the week for the next week", () => { - const timestamp = moment().add(2, "days").toISOString(); - expect(Changelog.toCalendarDate(timestamp)).oneOf([ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday", - ]); - }); - - it("should return the day of the week for the previous week", () => { - const timestamp = moment().subtract(3, "days").toISOString(); - expect(Changelog.toCalendarDate(timestamp)).oneOf([ - "last Monday", - "last Tuesday", - "last Wednesday", - "last Thursday", - "last Friday", - "last Saturday", - "last Sunday", - ]); - }); - - it("should return the date for any other day", () => { - const timestamp = "2020-01-01T00:00:00Z"; - expect(Changelog.toCalendarDate(timestamp)).toEqual("1/1/2020"); - - const timestamp2 = "2020-01-31T00:00:00Z"; - expect(Changelog.toCalendarDate(timestamp2)).toEqual("1/31/2020"); - }); -}); - -describe("Changelog.withinLastWeek", () => { - it("should return true for today", () => { - const timestamp = moment().toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(true); - }); - - it("should return true for yesterday", () => { - const timestamp = moment().subtract(1, "day").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(true); - }); - - it("should return true for 6 days ago", () => { - const timestamp = moment().subtract(6, "days").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(true); - }); - - it("should return false for 8 days ago", () => { - const timestamp = moment().subtract(8, "days").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(false); - }); - - it("should return false for 10 days ago", () => { - const timestamp = moment().subtract(10, "days").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(false); - }); - - it("should return false tomorrow", () => { - const timestamp = moment().add(1, "day").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(false); - }); - - it("should return false for 7 days from now", () => { - const timestamp = moment().add(7, "days").toISOString(); - expect(Changelog.withinLastWeek(timestamp)).toEqual(false); - }); -}); - -describe("Changelog.isFutureDate", () => { - it("should return true for today", () => { - const timestamp = moment().toISOString(); - expect(Changelog.isFutureDate(timestamp)).toEqual(false); - }); - - it("should return false for yesterday", () => { - const timestamp = moment().subtract(1, "day").toISOString(); - expect(Changelog.isFutureDate(timestamp)).toEqual(false); - }); - - it("should return false for 7 days ago", () => { - const timestamp = moment().subtract(7, "days").toISOString(); - expect(Changelog.isFutureDate(timestamp)).toEqual(false); - }); - - it("should return true for tomorrow", () => { - const timestamp = moment().add(1, "day").toISOString(); - expect(Changelog.isFutureDate(timestamp)).toEqual(true); - }); - - it("should return true for 7 days from now", () => { - const timestamp = moment().add(7, "days").toISOString(); - expect(Changelog.isFutureDate(timestamp)).toEqual(true); - }); -}); diff --git a/packages/ui/components/package.json b/packages/ui/components/package.json index e5d42c4b88..e7b5dc362f 100644 --- a/packages/ui/components/package.json +++ b/packages/ui/components/package.json @@ -21,7 +21,7 @@ "scripts": { "clean": "rm -rf ./dist && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals --disable-console-intercept", + "test": "vitest --run --passWithNoTests --globals --disable-console-intercept", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/ui/docs-bundle/package.json b/packages/ui/docs-bundle/package.json index efb7092988..41ba695f25 100644 --- a/packages/ui/docs-bundle/package.json +++ b/packages/ui/docs-bundle/package.json @@ -17,7 +17,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/ui/fontawesome-cdn/package.json b/packages/ui/fontawesome-cdn/package.json index 1d7edda1ff..b9e17daf8c 100644 --- a/packages/ui/fontawesome-cdn/package.json +++ b/packages/ui/fontawesome-cdn/package.json @@ -17,7 +17,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/packages/ui/local-preview-bundle/package.json b/packages/ui/local-preview-bundle/package.json index c0db078ae8..68abb557e1 100644 --- a/packages/ui/local-preview-bundle/package.json +++ b/packages/ui/local-preview-bundle/package.json @@ -17,7 +17,7 @@ "scripts": { "clean": "rm -rf ./lib && tsc --build --clean", "compile": "tsc --build", - "test": "vitest --passWithNoTests --globals", + "test": "vitest --run --passWithNoTests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "lint:style": "stylelint 'src/**/*.scss' --allow-empty-input --max-warnings 0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf185c4a25..44ce9f5d15 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -236,6 +236,60 @@ importers: specifier: ^4.0.131 version: 4.0.159(@types/react@18.3.1)(openapi-types@12.1.3)(react-dom@18.3.1)(react@18.3.1) + clis/generator-cli: + devDependencies: + '@fern-api/fs-utils': + specifier: 0.15.0-rc63 + version: 0.15.0-rc63 + '@types/jest': + specifier: ^29.5.11 + version: 29.5.12 + '@types/lodash-es': + specifier: ^4.17.12 + version: 4.17.12 + '@types/node': + specifier: ^18.7.18 + version: 18.19.33 + '@types/yargs': + specifier: ^17.0.32 + version: 17.0.32 + '@yarnpkg/esbuild-plugin-pnp': + specifier: ^3.0.0-rc.15 + version: 3.0.0-rc.15(esbuild@0.20.2) + depcheck: + specifier: ^1.4.3 + version: 1.4.7 + esbuild: + specifier: 0.20.2 + version: 0.20.2 + eslint: + specifier: ^8.56.0 + version: 8.57.0 + execa: + specifier: ^5.1.1 + version: 5.1.1 + lodash-es: + specifier: ^4.17.12 + version: 4.17.21 + organize-imports-cli: + specifier: ^0.10.0 + version: 0.10.0 + prettier: + specifier: ^3.2.4 + version: 3.2.5 + tsup: + specifier: ^8.0.2 + version: 8.0.2(postcss@8.4.31)(ts-node@10.9.2)(typescript@4.9.5) + typescript: + specifier: 4.9.5 + version: 4.9.5 + vitest: + specifier: ^1.5.0 + version: 1.6.0(@types/node@18.19.33) + yargs: + specifier: ^17.4.1 + version: 17.7.2 + packages/cdk: dependencies: '@fern-fern/fern-cloud-sdk': @@ -695,60 +749,6 @@ importers: specifier: ^1.5.0 version: 1.6.0(@types/node@18.19.33) - packages/generator-cli: - devDependencies: - '@fern-api/fs-utils': - specifier: 0.15.0-rc63 - version: 0.15.0-rc63 - '@types/jest': - specifier: ^29.5.11 - version: 29.5.12 - '@types/lodash-es': - specifier: ^4.17.12 - version: 4.17.12 - '@types/node': - specifier: ^18.7.18 - version: 18.19.33 - '@types/yargs': - specifier: ^17.0.32 - version: 17.0.32 - '@yarnpkg/esbuild-plugin-pnp': - specifier: ^3.0.0-rc.15 - version: 3.0.0-rc.15(esbuild@0.20.2) - depcheck: - specifier: ^1.4.3 - version: 1.4.7 - esbuild: - specifier: 0.20.2 - version: 0.20.2 - eslint: - specifier: ^8.56.0 - version: 8.57.0 - execa: - specifier: ^5.1.1 - version: 5.1.1 - lodash-es: - specifier: ^4.17.12 - version: 4.17.21 - organize-imports-cli: - specifier: ^0.10.0 - version: 0.10.0 - prettier: - specifier: ^3.2.4 - version: 3.2.5 - tsup: - specifier: ^8.0.2 - version: 8.0.2(postcss@8.4.31)(ts-node@10.9.2)(typescript@4.9.5) - typescript: - specifier: 4.9.5 - version: 4.9.5 - vitest: - specifier: ^1.5.0 - version: 1.6.0(@types/node@18.19.33) - yargs: - specifier: ^17.4.1 - version: 17.7.2 - packages/healthchecks: devDependencies: '@fern-api/fdr-sdk': diff --git a/servers/fdr/package.json b/servers/fdr/package.json index adcec5e56c..7e23096c27 100644 --- a/servers/fdr/package.json +++ b/servers/fdr/package.json @@ -85,7 +85,7 @@ "docker:local": "dotenv -e .env.test -- ./create_docker.sh local", "docker:dev": "dotenv -e .env.dev -- ./create_docker.sh", "docker:prod": "dotenv -e .env.prod -- ./create_docker.sh", - "test": "vitest src/__test__/unit-tests --globals --run", + "test": "vitest --run src/__test__/unit-tests --globals", "lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore", "lint:eslint:fix": "pnpm lint:eslint --fix", "test:local": "dotenv -e .env.test -- vitest src/__test__/local --globals --config src/__test__/local/vitest.config.ts", From 57e69199cc7a24964e1469bc31e5cc49387c8caa Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Mon, 10 Jun 2024 16:27:10 -0400 Subject: [PATCH 3/4] hack: Enable lexicographical sorting for AIA (#1000) --- .../converters/ApiReferenceNavigationConverter.ts | 15 ++++++++++++++- .../converters/NavigationConfigConverter.ts | 13 +++++++++++-- .../utils/convertLoadDocsForUrlResponse.ts | 7 +++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts b/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts index 10b21cc6f9..9055c4cdc8 100644 --- a/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts +++ b/packages/fdr-sdk/src/navigation/converters/ApiReferenceNavigationConverter.ts @@ -18,6 +18,7 @@ export class ApiReferenceNavigationConverter { baseSlug: string, parentSlug: string, idgen?: NodeIdGenerator, + lexicographic?: boolean, ) { return new ApiReferenceNavigationConverter( apiSection, @@ -25,6 +26,7 @@ export class ApiReferenceNavigationConverter { baseSlug, parentSlug, idgen ?? new NodeIdGenerator(), + lexicographic, ).convert(); } @@ -41,6 +43,7 @@ export class ApiReferenceNavigationConverter { private baseSlug: string, private apiDefinitionParentSlug: string, idgen: NodeIdGenerator, + private lexicographic: boolean = false, ) { this.apiDefinitionId = FernNavigation.ApiDefinitionId(api.id); this.#holder = ApiDefinitionHolder.create(api); @@ -229,7 +232,17 @@ export class ApiReferenceNavigationConverter { this.#visitedSubpackages.add(subpackageId); - return this.mergeEndpointPairs(children); + const toRet = this.mergeEndpointPairs(children); + + if (this.lexicographic) { + toRet.sort((a, b) => { + const aTitle = a.type === "endpointPair" ? a.nonStream.title : a.title; + const bTitle = b.type === "endpointPair" ? b.nonStream.title : b.title; + return aTitle.localeCompare(bTitle); + }); + } + + return toRet; } private convertApiNavigationItems( diff --git a/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts b/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts index 39bcce046d..0c7f83db28 100644 --- a/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts +++ b/packages/fdr-sdk/src/navigation/converters/NavigationConfigConverter.ts @@ -14,14 +14,16 @@ export class NavigationConfigConverter { private config: DocsV1Read.NavigationConfig, private apis: Record, private basePath: string | undefined, + private lexicographic?: boolean, ) {} public static convert( config: DocsV1Read.NavigationConfig, apis: Record, basePath: string | undefined, + lexicographic?: boolean, ): FernNavigation.RootNode { - return new NavigationConfigConverter(config, apis, basePath).convert(); + return new NavigationConfigConverter(config, apis, basePath, lexicographic).convert(); } #idgen = new NodeIdGenerator(); @@ -250,7 +252,14 @@ export class NavigationConfigConverter { if (api == null) { throw new Error(`API ${apiSection.api} not found}`); } - return ApiReferenceNavigationConverter.convert(apiSection, api, baseSlug, parentSlug, this.#idgen); + return ApiReferenceNavigationConverter.convert( + apiSection, + api, + baseSlug, + parentSlug, + this.#idgen, + this.lexicographic, + ); }, changelog: (changelog) => ChangelogNavigationConverter.convert(changelog, baseSlug, parentSlug, this.#idgen), diff --git a/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts b/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts index 10bcca8baa..f4a6209b0f 100644 --- a/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts +++ b/packages/fdr-sdk/src/navigation/utils/convertLoadDocsForUrlResponse.ts @@ -7,9 +7,16 @@ export function convertLoadDocsForUrlResponse(response: DocsV2Read.LoadDocsForUr response.definition.config.navigation, hackReorderApis(response.definition.apis, response.baseUrl.domain), response.baseUrl.basePath, + isLexicographicSortEnabled(response.baseUrl.domain), ); } +function isLexicographicSortEnabled(domain: string): boolean { + // HACKHACK: This is a temporary solution to enable lexicographic sorting for AIA docs. + // Vercel's edge config UI is broken right now so we can't modify it there. + return domain.toLowerCase().includes("aia.docs.buildwithfern.com"); +} + function hackReorderApis( apis: Record, domain: string, From 297a51869602b0901ba70b94a2ab794ba98940c0 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:30:29 -0400 Subject: [PATCH 4/4] add button pointer (#972) Co-authored-by: Andrew Jiang --- packages/ui/components/src/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/components/src/index.scss b/packages/ui/components/src/index.scss index 653c7ed7fe..58224bccce 100644 --- a/packages/ui/components/src/index.scss +++ b/packages/ui/components/src/index.scss @@ -140,7 +140,7 @@ @apply transition-[background]; @apply inline-flex items-center justify-center; @apply rounded-lg px-3 py-1 text-sm h-10 sm:h-8; - @apply cursor-default; + @apply cursor-pointer; &.multiline, &.multiline > .fern-button-content {