luclima commited on
Commit
cc4c0c1
·
verified ·
1 Parent(s): 9de2d54

Delete folder global_ai with huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. global_ai/.gitkeep +0 -0
  2. global_ai/canada/cohere-toolkit/.devcontainer/devcontainer.json +0 -12
  3. global_ai/canada/cohere-toolkit/.devcontainer/init.sh +0 -52
  4. global_ai/canada/cohere-toolkit/.env-template +0 -101
  5. global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/bug.yml +0 -21
  6. global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/config.yml +0 -8
  7. global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/feature_request.yml +0 -21
  8. global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/improvement.yml +0 -19
  9. global_ai/canada/cohere-toolkit/.github/actions/assistants-web-install/action.yml +0 -18
  10. global_ai/canada/cohere-toolkit/.github/actions/coral-web-install/action.yml +0 -18
  11. global_ai/canada/cohere-toolkit/.github/pull_request_template.md +0 -27
  12. global_ai/canada/cohere-toolkit/.github/scripts/check_revision_ids.py +0 -14
  13. global_ai/canada/cohere-toolkit/.github/scripts/run_docker_migration.sh +0 -5
  14. global_ai/canada/cohere-toolkit/.github/scripts/run_src_migration.sh +0 -6
  15. global_ai/canada/cohere-toolkit/.github/workflows/alembic_duplicates.yml +0 -30
  16. global_ai/canada/cohere-toolkit/.github/workflows/alembic_migrations.yml +0 -64
  17. global_ai/canada/cohere-toolkit/.github/workflows/automated_release.yml +0 -73
  18. global_ai/canada/cohere-toolkit/.github/workflows/backend_integration_tests.yml +0 -61
  19. global_ai/canada/cohere-toolkit/.github/workflows/backend_lint.yml +0 -26
  20. global_ai/canada/cohere-toolkit/.github/workflows/backend_typecheck.yml +0 -36
  21. global_ai/canada/cohere-toolkit/.github/workflows/backend_unit_tests.yml +0 -61
  22. global_ai/canada/cohere-toolkit/.github/workflows/docker_push_backend.yml +0 -45
  23. global_ai/canada/cohere-toolkit/.github/workflows/docker_push_frontend.yml +0 -44
  24. global_ai/canada/cohere-toolkit/.github/workflows/frontend_assistants_web_tests.yml +0 -32
  25. global_ai/canada/cohere-toolkit/.github/workflows/frontend_coral_web_tests.yml +0 -32
  26. global_ai/canada/cohere-toolkit/.github/workflows/frontend_slack_bot_tests.yml +0 -38
  27. global_ai/canada/cohere-toolkit/.gitignore +0 -161
  28. global_ai/canada/cohere-toolkit/.pre-commit-config.yaml +0 -20
  29. global_ai/canada/cohere-toolkit/.vscode/extensions.json +0 -5
  30. global_ai/canada/cohere-toolkit/.vscode/settings.default.json +0 -8
  31. global_ai/canada/cohere-toolkit/CODEOWNERS +0 -3
  32. global_ai/canada/cohere-toolkit/CONTRIBUTING.md +0 -41
  33. global_ai/canada/cohere-toolkit/Dockerfile +0 -77
  34. global_ai/canada/cohere-toolkit/LICENSE +0 -21
  35. global_ai/canada/cohere-toolkit/Makefile +0 -180
  36. global_ai/canada/cohere-toolkit/README.md +0 -91
  37. global_ai/canada/cohere-toolkit/app.json +0 -34
  38. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-api.Dockerfile +0 -48
  39. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-db.Dockerfile +0 -1
  40. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-fe.Dockerfile +0 -31
  41. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-nginx.Dockerfile +0 -8
  42. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-terrarium.Dockerfile +0 -5
  43. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws_cleanup.sh +0 -4
  44. global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws_deploy.sh +0 -18
  45. global_ai/canada/cohere-toolkit/aws_copilot_deploy/nginx.conf +0 -83
  46. global_ai/canada/cohere-toolkit/azure_compose_deploy/api_entrypoint.sh +0 -4
  47. global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-api.Dockerfile +0 -52
  48. global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-db.Dockerfile +0 -2
  49. global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-fe.Dockerfile +0 -31
  50. global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-nginx.Dockerfile +0 -8
global_ai/.gitkeep DELETED
File without changes
global_ai/canada/cohere-toolkit/.devcontainer/devcontainer.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "image": "mcr.microsoft.com/devcontainers/universal:2",
3
- "features": {
4
- "ghcr.io/devcontainers/features/python": {
5
- "version": "3.11"
6
- },
7
- "ghcr.io/devcontainers-contrib/features/poetry": {}
8
- },
9
- "forwardPorts": [
10
- 8000
11
- ]
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.devcontainer/init.sh DELETED
@@ -1,52 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Check if .env file exists or needs to be created
4
- if [ ! -f .env ]; then
5
- # Check if .env-template exists and copy it to .env
6
- if [ -f .env-template ]; then
7
- cp .env-template .env
8
- else
9
- echo "Error: .env-template file not found. Please create or copy it to the current directory."
10
- fi
11
- fi
12
-
13
- # Get and replace CODESPACE_NAME in .env file if it exists
14
- if [ -f .env ]; then
15
- CODESPACE_NAME=$(eval echo "$CODESPACE_NAME")
16
- sed -i "s|NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000|NEXT_PUBLIC_API_HOSTNAME=https://$CODESPACE_NAME-8000.app.github.dev|g" .env
17
- fi
18
-
19
- port=8000
20
- visibility=public
21
- max_attempts=5
22
- backoff_seconds=2
23
-
24
- # Check gh command and its output
25
- gh_output=$(gh --version 2>&1)
26
- gh_exit_code=$?
27
-
28
- if [ $gh_exit_code -ne 0 ]; then
29
- echo "Error: 'gh' command not found. Please install GitHub CLI."
30
- exit 1
31
- fi
32
-
33
- # Update port visibility with exponential backoff
34
- attempt=1
35
- echo "Updating port $port visibility to $visibility (attempt $attempt/$max_attempts)"
36
- while true; do
37
- if gh codespace ports visibility $port:$visibility -c $CODESPACE_NAME; then
38
- break # Exit the loop if successful
39
- fi
40
-
41
- echo "Error: Failed to update port visibility. Retrying in $backoff_seconds seconds..."
42
- sleep $backoff_seconds
43
- backoff_seconds=$((backoff_seconds * 2)) # Double the backoff time for each retry
44
- attempt=$((attempt + 1))
45
-
46
- if [ $attempt -gt $max_attempts ]; then
47
- echo "Exceeded maximum attempts. Failed to update port visibility."
48
- exit 1
49
- fi
50
- done
51
-
52
- echo "Set up complete. Add API key(s) to your .env file and then run \`make up\`."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.env-template DELETED
@@ -1,101 +0,0 @@
1
- # REQUIRED VARIABLES
2
-
3
- NEXT_PUBLIC_API_HOSTNAME=http://localhost:8000
4
- DATABASE_URL=postgresql+psycopg2://postgres:postgres@db:5432
5
-
6
- # Migrate access token, used to authenticate requests to the migrate endpoint.
7
-
8
- # You can generate it using some random string generator.
9
-
10
- MIGRATE_TOKEN=<MIGRATE_TOKEN>
11
-
12
- # TOOLS
13
-
14
- PYTHON_INTERPRETER_URL=http://terrarium:8080
15
- TAVILY_API_KEY=<API_KEY_HERE>
16
- WOLFRAM_APP_ID=<APP_ID_HERE>
17
-
18
- # Use tools preamble to enhance the model with additional information for better tool usage.
19
- USE_TOOLS_PREAMBLE=True
20
-
21
-
22
- # CORAL WEB
23
-
24
- NEXT_PUBLIC_HAS_CUSTOM_LOGO=false
25
-
26
- # DEPLOYMENTS
27
-
28
- # To use the Toolkit, at least one deployment must be setup, the simplest
29
-
30
- # being the Cohere Platform. See the README.md for more details.
31
-
32
- # 1 - Cohere Platform
33
-
34
- COHERE_API_KEY=<API_KEY_HERE>
35
-
36
- # 2 - SageMaker
37
-
38
- SAGE_MAKER_ACCESS_KEY=<ACCESS KEY>
39
- SAGE_MAKER_SECRET_KEY=<SECRET KEY>
40
- SAGE_MAKER_SESSION_TOKEN=<SESSION TOKEN>
41
- SAGE_MAKER_REGION_NAME=<REGION NAME>
42
- SAGE_MAKER_ENDPOINT_NAME=<ENDPOINT NAME>
43
-
44
- # 3 - Azure
45
-
46
- AZURE_API_KEY=<API KEY>
47
- AZURE_CHAT_ENDPOINT_URL=<ENDPOINT URL>
48
-
49
- # 4 - Bedrock
50
-
51
- BEDROCK_ACCESS_KEY=<ACCESS KEY>
52
- BEDROCK_SECRET_KEY=<SECRET KEY>
53
- BEDROCK_SESSION_TOKEN=<SESSION TOKEN>
54
- BEDROCK_REGION_NAME=<REGION NAME>
55
-
56
- # Experimental features
57
-
58
- USE_AGENTS_VIEW=False
59
-
60
- # Community features
61
-
62
- USE_COMMUNITY_FEATURES='True'
63
-
64
- # For setting up authentication, see: docs/auth_guide.md
65
-
66
- AUTH_SECRET_KEY=<See auth.guide.md on how to generate a secure one>
67
-
68
- # Required for specifying OAuth Redirect URI
69
-
70
- FRONTEND_HOSTNAME=http://localhost:4000
71
- NEXT_PUBLIC_FRONTEND_HOSTNAME=${FRONTEND_HOSTNAME}
72
-
73
- # Redis
74
-
75
- REDIS_URL=redis://:redis@redis:6379
76
-
77
- # Google OAuth
78
-
79
- GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID>
80
- GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET>
81
-
82
- # OpenID Connect
83
-
84
- OIDC_CLIENT_ID=<OIDC_CLIENT_ID>
85
- OIDC_CLIENT_SECRET=<OIDC_CLIENT_SECRET>
86
- OIDC_WELL_KNOWN_ENDPOINT=<OIDC_WELL_KNOWN_ENDPOINT>
87
-
88
- # SCIM
89
- SCIM_USER=<SCIM_USER>
90
- SCIM_PASSWORD=<SCIM_PASSWORD>
91
-
92
- # Google Drive
93
-
94
- GOOGLE_DRIVE_CLIENT_ID=
95
- GOOGLE_DRIVE_CLIENT_SECRET=
96
- NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID=${GOOGLE_DRIVE_CLIENT_ID}
97
- NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY=
98
-
99
- # Google Cloud
100
-
101
- GOOGLE_CLOUD_API_KEY=<API_KEY_HERE>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/bug.yml DELETED
@@ -1,21 +0,0 @@
1
- name: Bug
2
- description: Raise a bug related to existing functionality
3
- labels:
4
- - bug
5
- body:
6
- - type: textarea
7
- attributes:
8
- label: What is the issue?
9
- description: |
10
- - Give as much detail as you can to help us understand the bug.
11
- - Include any error messages or error codes.
12
- - Try to add reproduction steps if possible.
13
- validations:
14
- required: true
15
-
16
- - type: textarea
17
- attributes:
18
- label: Additional information
19
- description: Any other context, images or comments to add.
20
- validations:
21
- required: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/config.yml DELETED
@@ -1,8 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Documentation
4
- url: https://docs.cohere.com/docs
5
- about: For detailed information about Cohere's API visit the documentation page.
6
- - name: General Community Help
7
- url: https://discord.com/invite/co-mmunity
8
- about: For any general question not related to connectors please visit Cohere's Community's Discord.
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/feature_request.yml DELETED
@@ -1,21 +0,0 @@
1
- name: Feature request
2
- description: Request a new feature
3
- labels:
4
- - feature
5
- body:
6
- - type: textarea
7
- attributes:
8
- label: What feature(s) would you like to see?
9
- description: |
10
- - Give as much detail as you can to help us understand the feature.
11
- - What benefits would this feature bring, and how would the user interact with it?
12
- - Feel free to give any technical suggestions on how this should be implemented.
13
- validations:
14
- required: true
15
-
16
- - type: textarea
17
- attributes:
18
- label: Additional information
19
- description: Any other context, images or comments to add.
20
- validations:
21
- required: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/ISSUE_TEMPLATE/improvement.yml DELETED
@@ -1,19 +0,0 @@
1
- name: Improvement
2
- description: Improve any existing functionality, and/or add documentation
3
- labels:
4
- - improvement
5
- body:
6
- - type: textarea
7
- attributes:
8
- label: What improvement(s) are you suggesting?
9
- description: |
10
- - Give as many details as you can, including any implementation steps, if any.
11
- validations:
12
- required: true
13
-
14
- - type: textarea
15
- attributes:
16
- label: Additional information
17
- description: Any other context, images or comments to add.
18
- validations:
19
- required: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/actions/assistants-web-install/action.yml DELETED
@@ -1,18 +0,0 @@
1
- name: js-install
2
- description: Set up Node.js/npm, install dependencies
3
-
4
- runs:
5
- using: composite
6
- steps:
7
- - uses: actions/checkout@v4
8
- - name: Install Node.js
9
- uses: actions/setup-node@v4
10
- with:
11
- node-version-file: "src/interfaces/assistants_web/.nvmrc"
12
- cache: "npm"
13
- cache-dependency-path: "src/interfaces/assistants_web/package-lock.json"
14
-
15
- - name: Install dependencies with npm
16
- shell: bash
17
- working-directory: src/interfaces/assistants_web
18
- run: npm ci
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/actions/coral-web-install/action.yml DELETED
@@ -1,18 +0,0 @@
1
- name: js-install
2
- description: Set up Node.js/npm, install dependencies
3
-
4
- runs:
5
- using: composite
6
- steps:
7
- - uses: actions/checkout@v4
8
- - name: Install Node.js
9
- uses: actions/setup-node@v4
10
- with:
11
- node-version-file: "src/interfaces/coral_web/.nvmrc"
12
- cache: "npm"
13
- cache-dependency-path: "src/interfaces/coral_web/package-lock.json"
14
-
15
- - name: Install dependencies with npm
16
- shell: bash
17
- working-directory: src/interfaces/coral_web
18
- run: npm ci
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/pull_request_template.md DELETED
@@ -1,27 +0,0 @@
1
- Thank you for contributing to the Cohere Toolkit!
2
-
3
- - [ ] **PR title**: "area: description"
4
-
5
- - Where "area" is whichever of interface, frontend, model, tools, backend, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
6
- - Example: "deployment: add Azure model option"
7
-
8
- - [ ] **PR message**: **_Delete this entire checklist_** and replace with
9
-
10
- - **Description:** a description of the change
11
- - **Issue:** the issue # it fixes, if applicable
12
- - **Dependencies:** any dependencies required for this change
13
-
14
- - [ ] **Add tests and docs**: Please include testing and documentation for your changes
15
- - [ ] **Lint and test**: Run `make lint` and `make run-unit-tests`
16
-
17
- **AI Description**
18
-
19
- <!-- begin-generated-description -->
20
-
21
- <!--
22
- New: command-r-plus will maintain a pr description for you!
23
- Simply delete this section to opt out.
24
- Content inside this section will be overwritten by command as the PR is updated.
25
- -->
26
-
27
- <!-- end-generated-description -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/scripts/check_revision_ids.py DELETED
@@ -1,14 +0,0 @@
1
- import glob
2
-
3
-
4
- def main():
5
- files = glob.glob("src/backend/alembic/versions/*.py")
6
-
7
- if len(files) != len(set(files)):
8
- raise Exception("Duplicate file name found")
9
-
10
- print("All revision IDs are unique")
11
-
12
-
13
- if __name__ == "__main__":
14
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/scripts/run_docker_migration.sh DELETED
@@ -1,5 +0,0 @@
1
- #!/bin/bash
2
- cd $SSH_PROJECT_DIR
3
- git pull
4
- make migrate
5
- echo "Migration complete"
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/scripts/run_src_migration.sh DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
- cd $SSH_PROJECT_DIR
3
- git pull
4
- source .venv/bin/activate
5
- alembic -c src/backend/alembic.ini upgrade head
6
- echo "Migration complete"
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/alembic_duplicates.yml DELETED
@@ -1,30 +0,0 @@
1
- name: Alembic - No duplicate IDs
2
-
3
- on:
4
- pull_request:
5
- paths:
6
- - 'src/backend/alembic/versions/**'
7
- push:
8
- paths:
9
- - 'src/backend/alembic/versions/**'
10
-
11
- jobs:
12
- check-alembic-revision-ids:
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - name: Checkout code
17
- uses: actions/checkout@v2
18
-
19
- - name: Set up Python
20
- uses: actions/setup-python@v2
21
- with:
22
- python-version: 3.8
23
-
24
- - name: Install dependencies
25
- run: |
26
- python -m pip install --upgrade pip
27
- pip install alembic
28
-
29
- - name: Check for duplicate revision IDs
30
- run: python .github/scripts/check_revision_ids.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/alembic_migrations.yml DELETED
@@ -1,64 +0,0 @@
1
- name: Alembic - Automate migrations
2
- # This workflow provides a way to run Alembic migrations using SSH or migration API or database URL.
3
- on:
4
- push:
5
- branches: [ main ]
6
- jobs:
7
- run-alembic-migrations-ssh:
8
- runs-on: ubuntu-latest
9
- environment: production
10
- env:
11
- SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
12
- SSH_HOST: ${{secrets.SSH_HOST}}
13
- SSH_PORT: ${{secrets.SSH_PORT}}
14
- SSH_USER_NAME: ${{secrets.SSH_USER_NAME}}
15
- DATABASE_URL: ${{secrets.MIGRATION_DATABASE_URL}}
16
- MIGRATION_API_ENDPOINT: ${{secrets.MIGRATION_API_ENDPOINT}}
17
- MIGRATION_API_TOKEN: ${{secrets.MIGRATION_API_TOKEN}}
18
- # If migration API params are present, use backend API to run migrations.
19
- USE_MIGRATION_API: ${{ (secrets.MIGRATION_API_ENDPOINT != '') && (secrets.MIGRATION_API_TOKEN != '') }}
20
- # If database URL is present, run migrations on DB connection.
21
- # Please note that the database connection should be open to the IP from where the migrations are being run.
22
- # If you are using a private network, you can set up SSH tunnel to run migrations.
23
- USE_DATABASE_URL: ${{ secrets.MIGRATION_DATABASE_URL != '' }}
24
- # If SSH params are present, use SSH to run migrations.
25
- USE_SSH: ${{ (secrets.SSH_PRIVATE_KEY != '') && (secrets.SSH_HOST != '') && (secrets.SSH_USER_NAME != '') && (secrets.SSH_PORT != '')}}
26
-
27
- steps:
28
- - name: Run Alembic Migrations SSH
29
- if: ${{ (env.USE_SSH == 'true' && env.USE_MIGRATION_API == 'false' && env.USE_DATABASE_URL == 'false') }}
30
- run: |
31
- echo "Running migrations using SSH"
32
- echo "$SSH_PRIVATE_KEY" > private_key && chmod 600 private_key
33
- ssh -o StrictHostKeyChecking=no -i private_key ${SSH_USER_NAME}@${SSH_HOST} -p ${SSH_PORT} '
34
- export SSH_PROJECT_DIR=~/cohere-toolkit && # Set the project directory here
35
- sh $SSH_PROJECT_DIR/.github/scripts/run_docker_migration.sh && # Delete this command if your toolkit is not in a docker container
36
- sh $SSH_PROJECT_DIR/.github/scripts/run_src_migration.sh # Delete this command if your toolkit is in a docker container
37
- '
38
- - name: Run Alembic Migrations API
39
- if: ${{ (env.USE_SSH == 'false' && env.USE_MIGRATION_API == 'true' && env.USE_DATABASE_URL == 'false') }}
40
- run: |
41
- echo "Running migrations using the migration API"
42
- curl -H "Authorization: Bearer $MIGRATION_API_TOKEN" -X POST $MIGRATION_API_ENDPOINT
43
- - name: Checkout repository
44
- if: ${{(env.USE_SSH == 'false' && env.USE_MIGRATION_API == 'false' && env.USE_DATABASE_URL == 'true') || (env.USE_SSH == 'true' && env.USE_MIGRATION_API == 'true' && env.USE_DATABASE_URL == 'true') }}
45
- uses: actions/checkout@v4
46
- - name: Set up Python 3.11
47
- if: ${{(env.USE_SSH == 'false' && env.USE_MIGRATION_API == 'false' && env.USE_DATABASE_URL == 'true') || (env.USE_SSH == 'true' && env.USE_MIGRATION_API == 'true' && env.USE_DATABASE_URL == 'true') }}
48
- uses: actions/setup-python@v5
49
- with:
50
- python-version: "3.11"
51
- - name: Run Alembic Migrations Database
52
- if: ${{(env.USE_SSH == 'false' && env.USE_MIGRATION_API == 'false' && env.USE_DATABASE_URL == 'true') || (env.USE_SSH == 'true' && env.USE_MIGRATION_API == 'true' && env.USE_DATABASE_URL == 'true') }}
53
- run: |
54
- echo "Running migrations using the database URL"
55
- pip install poetry==1.7.1
56
- export POETRY_VIRTUALENVS_IN_PROJECT=true
57
- poetry install
58
- echo "DATABASE_URL=$DATABASE_URL" > .env
59
- source .venv/bin/activate
60
- alembic -c src/backend/alembic.ini upgrade head
61
- - name: Fail Migration
62
- if: ${{ (env.USE_SSH == 'false' && env.USE_MIGRATION_API == 'false' && env.USE_DATABASE_URL == 'false') }}
63
- run: |
64
- echo "Migration failed. Please provide either SSH, Migration API or Database URL environment variables. See the README for more information."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/automated_release.yml DELETED
@@ -1,73 +0,0 @@
1
- name: Automated Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- check-and-release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- # Checkout
13
- - name: Checkout code
14
- uses: actions/checkout@v3
15
-
16
- # Get the latest release version
17
- - name: Get latest release version
18
- id: get_latest_release
19
- env:
20
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21
- run: |
22
- latest_release=$(gh release list --limit 1 --json tagName --jq '.[0].tagName' || echo "v0.0.0")
23
- echo "latest_release=${latest_release}" >> $GITHUB_ENV
24
-
25
- # Extract version from _RELEASE_VERSION constant in main.py
26
- - name: Extract version from main.py
27
- id: get_submitted_version
28
- run: |
29
- submitted_version=$(grep '_RELEASE_VERSION' src/backend/main.py | sed -E 's/.*"([^"]+)".*/\1/')
30
- echo "submitted_version=${submitted_version}" >> $GITHUB_ENV
31
-
32
- # Check if new version is greater
33
- - name: Check if new version is greater
34
- id: check_version
35
- run: |
36
- latest_version_number=$(echo "$latest_release" | sed 's/^v//')
37
- submitted_version_number=$(echo "$submitted_version" | sed 's/^v//')
38
- # Get major, minor, and patch from the versions
39
- IFS='.' read -r l_major l_minor l_patch <<<"$latest_version_number"
40
- IFS='.' read -r f_major f_minor f_patch <<<"$submitted_version_number"
41
- # Compare major, minor, and patch versions
42
- if [ "$f_major" -gt "$l_major" ] ||
43
- ([ "$f_major" -eq "$l_major" ] && [ "$f_minor" -gt "$l_minor" ]) ||
44
- ([ "$f_major" -eq "$l_major" ] && [ "$f_minor" -eq "$l_minor" ] && [ "$f_patch" -gt "$l_patch" ]); then
45
- echo "new_version_needed=true" >> $GITHUB_ENV
46
- echo "NEED TO CREATE A NEW RELEASE."
47
- else
48
- echo "new_version_needed=false" >> $GITHUB_ENV
49
- echo "NO NEED TO CREATE A NEW RELEASE."
50
- exit 0
51
- fi
52
-
53
- # Create a new release if the version is greater
54
- - name: Create new release
55
- if: env.new_version_needed == 'true'
56
- env:
57
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58
- run: |
59
- release_date=$(date +'%Y-%m-%d')
60
- release_title="${release_date} (${submitted_version})"
61
- description="### Full Changelog: https://github.com/${GITHUB_REPOSITORY}/compare/${latest_release}...${submitted_version}"
62
- latest_release_date=$(gh release view "${latest_release}" --json createdAt --jq '.createdAt')
63
- changelog=$(gh pr list --state merged --base main --search "merged:>$latest_release_date" --json title,number,url,author --jq '.[] | "- PR #" + (.number|tostring) + " by @" + (.author.login) + ": " + .title')
64
- if [[ -z "$changelog" ]]; then
65
- echo "No pull requests found since the last release."
66
- changelog="No pull requests found since the last release."
67
- fi
68
- description="## What's Changed:\n${changelog}\n${description}"
69
- echo "Creating release with title: $release_title"
70
- gh release create "${submitted_version}" \
71
- --title "$release_title" \
72
- --notes "$(echo -e "$description")"
73
- echo "Release created successfully."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/backend_integration_tests.yml DELETED
@@ -1,61 +0,0 @@
1
- name: Backend - Integration tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - src/backend/**
9
- pull_request:
10
- paths:
11
- - src/backend/**
12
-
13
- jobs:
14
- pytest:
15
- permissions: write-all
16
- # environment: development
17
- runs-on: ubuntu-latest
18
-
19
- steps:
20
- - name: Checkout repo
21
- uses: actions/checkout@v3
22
-
23
- - uses: actions/setup-python@v5
24
- with:
25
- python-version: '3.11'
26
- cache: 'pip'
27
-
28
- - name: Install poetry
29
- uses: snok/install-poetry@v1
30
- with:
31
- virtualenvs-create: true
32
- virtualenvs-in-project: true
33
- virtualenvs-path: .venv
34
- installer-parallel: true
35
-
36
- - name: Load cached venv
37
- id: cached-poetry-dependencies
38
- uses: actions/cache@v4
39
- with:
40
- path: .venv
41
- key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
42
-
43
- - name: Install dependencies
44
- if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45
- run: poetry install --with dev --no-interaction --no-root
46
-
47
- - name: Setup test DB container
48
- run: make test-db
49
-
50
- - name: Test with pytest
51
- if: github.actor != 'dependabot[bot]'
52
- run: |
53
- make run-integration-tests
54
- env:
55
- PYTHONPATH: src
56
-
57
- - name: Upload coverage reports to Codecov
58
- uses: codecov/codecov-action@v4.0.1
59
- with:
60
- token: ${{ secrets.CODECOV_TOKEN }}
61
- file: coverage.xml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/backend_lint.yml DELETED
@@ -1,26 +0,0 @@
1
- name: Backend - Lint
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - src/backend/**
9
- pull_request:
10
- paths:
11
- - src/backend/**
12
-
13
- jobs:
14
- lint:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: Checkout code
18
- uses: actions/checkout@v4
19
- with:
20
- fetch-depth: 0
21
- clean: true
22
- - name: Run lint checks
23
- uses: astral-sh/ruff-action@v3
24
- with:
25
- src: './src/'
26
- version: 0.6.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/backend_typecheck.yml DELETED
@@ -1,36 +0,0 @@
1
- name: Backend - Typecheck new files
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - src/backend/**
9
- pull_request:
10
- paths:
11
- - src/backend/**
12
-
13
- jobs:
14
- check:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: actions/checkout@v3
18
- - run: pipx install poetry
19
- - uses: actions/setup-python@v4
20
- with:
21
- python-version: '3.11'
22
- cache: 'poetry'
23
- - run: poetry install
24
- - run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
25
- - name: Get new files added in the PR
26
- id: get_new_files
27
- run: |
28
- git fetch origin main
29
- NEW_PY_FILES=$(git diff --name-only --diff-filter=A origin/main HEAD | grep '\.py$' | tr '\n' ' ')
30
- echo "New files: $NEW_PY_FILES"
31
- echo "new_py_files=$NEW_PY_FILES" >> $GITHUB_OUTPUT
32
- - name: Typecheck new files
33
- uses: jakebailey/pyright-action@v2
34
- with:
35
- version: 1.1.311
36
- extra-args: ${{ steps.get_new_files.outputs.new_py_files }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/backend_unit_tests.yml DELETED
@@ -1,61 +0,0 @@
1
- name: Backend - Unit tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- paths:
8
- - src/backend/**
9
- pull_request:
10
- paths:
11
- - src/backend/**
12
-
13
- jobs:
14
- pytest:
15
- permissions: write-all
16
- # environment: development
17
- runs-on: ubuntu-latest
18
-
19
- steps:
20
- - name: Checkout repo
21
- uses: actions/checkout@v3
22
-
23
- - uses: actions/setup-python@v5
24
- with:
25
- python-version: '3.11'
26
- cache: 'pip'
27
-
28
- - name: Install poetry
29
- uses: snok/install-poetry@v1
30
- with:
31
- virtualenvs-create: true
32
- virtualenvs-in-project: true
33
- virtualenvs-path: .venv
34
- installer-parallel: true
35
-
36
- - name: Load cached venv
37
- id: cached-poetry-dependencies
38
- uses: actions/cache@v4
39
- with:
40
- path: .venv
41
- key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
42
-
43
- - name: Install dependencies
44
- if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45
- run: poetry install --with dev --no-interaction --no-root
46
-
47
- - name: Setup test DB container
48
- run: make test-db
49
-
50
- - name: Test with pytest
51
- if: github.actor != 'dependabot[bot]'
52
- run: |
53
- make run-unit-tests
54
- env:
55
- PYTHONPATH: src
56
-
57
- - name: Upload coverage reports to Codecov
58
- uses: codecov/codecov-action@v4.0.1
59
- with:
60
- token: ${{ secrets.CODECOV_TOKEN }}
61
- file: coverage.xml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/docker_push_backend.yml DELETED
@@ -1,45 +0,0 @@
1
- name: Backend - Create and publish Docker image
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
- inputs:
8
- tags:
9
- description: 'Docker image tag (e.g: v0.0.1)'
10
- required: false
11
- type: string
12
-
13
- env:
14
- REGISTRY: ghcr.io
15
- IMAGE_NAME: cohere-toolkit-backend
16
-
17
- jobs:
18
- build-and-push-backend-image:
19
- runs-on: ubuntu-latest
20
- # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
21
- permissions:
22
- contents: read
23
- packages: write
24
- steps:
25
- - name: Checkout repository
26
- uses: actions/checkout@v4
27
- - name: Log in to the Container registry
28
- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
29
- with:
30
- registry: ${{ env.REGISTRY }}
31
- username: ${{ github.actor }}
32
- password: ${{ secrets.GITHUB_TOKEN }}
33
-
34
- - name: Extract metadata (tags, labels) for Docker
35
- id: meta
36
- uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
37
- with:
38
- images: ${{ env.REGISTRY }}/cohere-ai/${{ env.IMAGE_NAME }}
39
- - name: Build and push Docker image
40
- uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
41
- with:
42
- context: .
43
- tags: ${{ steps.meta.outputs.tags }}
44
- file: ./src/backend/Dockerfile
45
- push: true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/docker_push_frontend.yml DELETED
@@ -1,44 +0,0 @@
1
- name: Frontend - Create and publish Docker image
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
- inputs:
8
- tags:
9
- description: 'Docker image tag (e.g: v0.0.1)'
10
- required: false
11
- type: string
12
-
13
- env:
14
- REGISTRY: ghcr.io
15
- IMAGE_NAME: cohere-toolkit-frontend
16
-
17
- jobs:
18
- build-and-push-frontend-image:
19
- runs-on: ubuntu-latest
20
- # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
21
- permissions:
22
- contents: read
23
- packages: write
24
- steps:
25
- - name: Checkout repository
26
- uses: actions/checkout@v4
27
- - name: Log in to the Container registry
28
- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
29
- with:
30
- registry: ${{ env.REGISTRY }}
31
- username: ${{ github.actor }}
32
- password: ${{ secrets.GITHUB_TOKEN }}
33
-
34
- - name: Extract metadata (tags, labels) for Docker
35
- id: meta
36
- uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
37
- with:
38
- images: ${{ env.REGISTRY }}/cohere-ai/${{ env.IMAGE_NAME }}
39
- - name: Build and push Docker image
40
- uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
41
- with:
42
- context: ./src/interfaces/coral_web
43
- tags: ${{ steps.meta.outputs.tags }}
44
- push: true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/frontend_assistants_web_tests.yml DELETED
@@ -1,32 +0,0 @@
1
- name: Assistants Web - Format, Build & Validate
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- paths:
7
- - src/interfaces/assistants_web/**
8
- pull_request: {}
9
-
10
- jobs:
11
- interface_tests:
12
- runs-on: ubuntu-latest
13
- defaults:
14
- run:
15
- working-directory: src/interfaces/assistants_web
16
- steps:
17
- - name: Checkout repo
18
- uses: actions/checkout@v3
19
- with:
20
- fetch-depth: 2
21
- - name: Start backend (for OpenAPI)
22
- run: docker compose up backend -d
23
- - name: Set up Node.js and install dependencies
24
- uses: ./.github/actions/assistants-web-install
25
- - name: Check format
26
- run: npm run format
27
- - name: Check build
28
- run: npm run build
29
- - name: Generate client
30
- run: npm run generate:client && npm run format:write
31
- - name: Check generated client
32
- run: git diff --exit-code ./src/cohere-client/generated || (echo "Generated client is outdated. Please regenerate and commit." && exit 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/frontend_coral_web_tests.yml DELETED
@@ -1,32 +0,0 @@
1
- name: Coral Web - Format, Build & Validate
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- paths:
7
- - src/interfaces/coral_web/**
8
- pull_request: {}
9
-
10
- jobs:
11
- interface_tests:
12
- runs-on: ubuntu-latest
13
- defaults:
14
- run:
15
- working-directory: src/interfaces/coral_web
16
- steps:
17
- - name: Checkout repo
18
- uses: actions/checkout@v3
19
- with:
20
- fetch-depth: 2
21
- - name: Start backend (for OpenAPI)
22
- run: docker compose up backend -d
23
- - name: Set up Node.js and install dependencies
24
- uses: ./.github/actions/coral-web-install
25
- - name: Check format
26
- run: npm run format
27
- - name: Check build
28
- run: npm run build
29
- - name: Generate client
30
- run: npm run generate:client && npm run format:write
31
- - name: Check generated client
32
- run: git diff --exit-code ./src/cohere-client/generated || (echo "Generated client is outdated. Please regenerate and commit." && exit 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.github/workflows/frontend_slack_bot_tests.yml DELETED
@@ -1,38 +0,0 @@
1
- name: Slack Bot - Format, Build & Validate
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- paths:
7
- - src/interfaces/slack_bot/**
8
- pull_request: {}
9
-
10
- jobs:
11
- interface_tests:
12
- runs-on: ubuntu-latest
13
- defaults:
14
- run:
15
- working-directory: src/interfaces/slack_bot
16
- steps:
17
- - name: Checkout repo
18
- uses: actions/checkout@v3
19
- with:
20
- fetch-depth: 2
21
- - name: Install Node.js
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version-file: "src/interfaces/slack_bot/.nvmrc"
25
- cache: "npm"
26
- cache-dependency-path: "src/interfaces/slack_bot/package-lock.json"
27
- - name: Install dependencies with npm
28
- shell: bash
29
- working-directory: src/interfaces/slack_bot
30
- run: npm ci
31
- - name: Check format
32
- run: npm run format
33
- - name: Check types
34
- run: npm run tsc:check
35
- - name: Run tests
36
- run: npm run test
37
- - name: Check build
38
- run: npm run build
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.gitignore DELETED
@@ -1,161 +0,0 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- pip-wheel-metadata/
24
- share/python-wheels/
25
- *.egg-info/
26
- .installed.cfg
27
- *.egg
28
- MANIFEST
29
-
30
- # PyInstaller
31
- # Usually these files are written by a python script from a template
32
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
- *.manifest
34
- *.spec
35
-
36
- # Installer logs
37
- pip-log.txt
38
- pip-delete-this-directory.txt
39
-
40
- # Unit test / coverage reports
41
- htmlcov/
42
- .tox/
43
- .nox/
44
- .coverage
45
- .coverage.*
46
- .cache
47
- nosetests.xml
48
- coverage.xml
49
- *.cover
50
- *.py,cover
51
- .hypothesis/
52
- .pytest_cache/
53
- .ruff_cache/
54
-
55
- # Translations
56
- *.mo
57
- *.pot
58
-
59
- # Django stuff:
60
- *.log
61
- local_settings.py
62
- db.sqlite3
63
- db.sqlite3-journal
64
-
65
- # Flask stuff:
66
- instance/
67
- .webassets-cache
68
-
69
- # Scrapy stuff:
70
- .scrapy
71
-
72
- # Sphinx documentation
73
- docs/_build/
74
-
75
- # PyBuilder
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- .python-version
87
-
88
- # pipenv
89
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
91
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
92
- # install all needed dependencies.
93
- #Pipfile.lock
94
-
95
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow
96
- __pypackages__/
97
-
98
- # SageMath parsed files
99
- *.sage.py
100
-
101
- # Environments
102
- .env
103
- .venv
104
- env/
105
- venv/
106
- ENV/
107
- env.bak/
108
- venv.bak/
109
-
110
- # Spyder project settings
111
- .spyderproject
112
- .spyproject
113
-
114
- # Rope project settings
115
- .ropeproject
116
-
117
- # mkdocs documentation
118
- /site
119
-
120
- # mypy
121
- .mypy_cache/
122
- .dmypy.json
123
- dmypy.json
124
-
125
- # Pyre type checker
126
- .pyre/
127
-
128
- # Weights and Biases
129
- wandb/
130
-
131
- # Streamlit secrets
132
- secrets.toml
133
-
134
- # VScode settings
135
- .vscode/*
136
- !.vscode/extensions.json
137
- !.vscode/settings.default.json
138
-
139
- .DS_Store
140
-
141
- # JetBrains IDEs
142
- .idea
143
-
144
- # Local file storage
145
- /src/backend/data
146
-
147
- # Redis volume
148
- /data
149
-
150
- # SQL Data
151
- .db
152
-
153
- # Secret and config files
154
- /src/backend/config/configuration.yaml
155
- /src/backend/config/secrets.yaml
156
-
157
- logs/
158
- credentials.json
159
- token.json
160
- src/interfaces/assistants_web/bun.lockb
161
- /metrics/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.pre-commit-config.yaml DELETED
@@ -1,20 +0,0 @@
1
- repos:
2
- - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.3.0
4
- hooks:
5
- - id: check-yaml
6
- - id: check-toml
7
- - id: check-json
8
- - repo: https://github.com/PyCQA/isort
9
- rev: 5.12.0
10
- hooks:
11
- - id: isort
12
- args: [--profile=black, --line-width=88, --force-grid-wrap=0, --use-parentheses, --float-to-top]
13
- - repo: https://github.com/psf/black
14
- rev: 24.3.0
15
- hooks:
16
- - id: black
17
- - repo: https://github.com/charliermarsh/ruff-pre-commit
18
- rev: v0.4.10
19
- hooks:
20
- - id: ruff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.vscode/extensions.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "charliermarsh.ruff"
4
- ]
5
- }
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/.vscode/settings.default.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "editor.defaultFormatter": "charliermarsh.ruff",
3
- "editor.codeActionsOnSave": {
4
- "notebook.source.fixAll": "explicit",
5
- // uncomment this if you don't want the editor to automatically organize imports
6
- // "source.organizeImports": "never"
7
- }
8
- }
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/CODEOWNERS DELETED
@@ -1,3 +0,0 @@
1
- * @cohere-ai/toolkit @EugeneLightsOn @malexw @tianjing-li @ezawadski
2
- src/interfaces/coral_web @tomtobac @abimacarmes @knajjars @BeatrixCohere @tianjing-li @EugeneLightsOn @ezawadski
3
- src/interfaces/assistants_web @tomtobac @abimacarmes @knajjars @BeatrixCohere @tianjing-li @EugeneLightsOn @ezawadski
 
 
 
 
global_ai/canada/cohere-toolkit/CONTRIBUTING.md DELETED
@@ -1,41 +0,0 @@
1
- # OSS Toolkit Contributing Guide
2
-
3
- Thank you for your interest in contributing to Cohere's OSS toolkit. This guide covers the contribution workflow, from opening an issue to reviewing and merging changes. For development setup, please refer to the [README](README.md).
4
-
5
- ## Getting Started
6
-
7
- There are many ways to contribute beyond writing code. You can help by:
8
- - Writing tutorials or blog posts
9
- - Improving [the documentation](https://docs.cohere.com)
10
- - Submitting bug reports
11
-
12
- ## Table of Contents
13
-
14
- - [Assumptions](#assumptions)
15
- - [How to Contribute](#how-to-contribute)
16
- - [How to Add Features](#how-to-add-features)
17
-
18
- ## Assumptions
19
-
20
- Before contributing, please ensure:
21
- 1. You're familiar with [GitHub](https://github.com) and the [Pull Request (PR)](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) workflow.
22
- 2. You've read [Cohere's documentation](https://docs.cohere.com).
23
- 3. You know about the [Cohere community on Discord](https://discord.com/invite/co-mmunity).
24
-
25
- ## How to Contribute
26
-
27
- 1. **Open or Find an Issue**
28
- Ensure your contribution addresses an open issue. This helps gauge if the change will be accepted.
29
-
30
- 2. **Fork the Repository**
31
- [Fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) to your GitHub account.
32
-
33
- 3. **Make Your Changes**
34
- Work on your fork and ensure [your commits are signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).
35
-
36
- 4. **Submit a Pull Request (PR)**
37
- [Submit your fork as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch. A maintainer will review your PR, but response times may vary.
38
-
39
- ## How to Add Features
40
-
41
- Add new features to the `community` folder. This is where tools and deployments not managed by Codeowners are located.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/Dockerfile DELETED
@@ -1,77 +0,0 @@
1
- # This Dockerfile is intended for One-Click deployment to Google Cloud Run
2
- # ------------------------------------------------------------------------
3
- FROM ghcr.io/cohere-ai/terrarium:latest as terrarium
4
-
5
- FROM python:3.11
6
- LABEL authors="Cohere"
7
- ENV PG_APP_HOME=/etc/docker-app
8
- ENV PYTHON_VERSION=3.11.8
9
- ENV PYTHONDONTWRITEBYTECODE=1
10
- ENV PYTHONUNBUFFERED=1
11
- ENV PYTHONIOENCODING=utf-8
12
- ENV LANG C.UTF-8
13
- ENV PYTHONPATH=/workspace/src/
14
- ENV VIRTUAL_ENV=/workspace/.venv
15
- ENV PATH="$VIRTUAL_ENV/bin:$PATH"
16
- ENV POETRY_VIRTUALENVS_IN_PROJECT=true
17
- COPY docker_scripts/gcp-entrypoint.sh /sbin/gcp-entrypoint.sh
18
-
19
- RUN chmod 755 /sbin/gcp-entrypoint.sh \
20
- && curl -sL https://deb.nodesource.com/setup_18.x | bash - \
21
- && apt-get update \
22
- && apt-get install --no-install-recommends -y nginx nodejs \
23
- && apt-get clean \
24
- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
25
- && npm install -g pnpm \
26
- && npm install -g pm2
27
-
28
- # Copy nginx config \
29
- COPY docker_scripts/nginx.conf /etc/nginx/nginx.conf
30
-
31
- WORKDIR /workspace
32
-
33
- # Copy dependency files to avoid cache invalidations
34
- COPY pyproject.toml poetry.lock ./
35
-
36
- # Install dependencies
37
- RUN pip3 install --no-cache-dir poetry==1.6.1 \
38
- && poetry config installer.max-workers 10 \
39
- && poetry install \
40
- && (poetry cache clear --all --no-interaction PyPI || true) \
41
- && (poetry cache clear --all --no-interaction _default_cache || true)
42
-
43
- # Copy the rest of the code
44
- COPY src/backend src/backend
45
- COPY docker_scripts/ ${PG_APP_HOME}/
46
-
47
- # Install frontend dependencies
48
- WORKDIR /workspace/src/interfaces/assistants_web
49
- COPY src/interfaces/assistants_web/src ./src
50
- COPY src/interfaces/assistants_web/public ./public
51
- COPY src/interfaces/assistants_web/next.config.mjs .
52
- COPY src/interfaces/assistants_web/tsconfig.json .
53
- COPY src/interfaces/assistants_web/tailwind.config.js .
54
- COPY src/interfaces/assistants_web/postcss.config.js .
55
- COPY src/interfaces/assistants_web/package.json src/interfaces/assistants_web/yarn.lock* src/interfaces/assistants_web/package-lock.json* src/interfaces/assistants_web/pnpm-lock.yaml* ./
56
- COPY src/interfaces/assistants_web/.env.development .
57
- COPY src/interfaces/assistants_web/.env.production .
58
-
59
- ENV NEXT_PUBLIC_API_HOSTNAME='/api'
60
- RUN npm install \
61
- && npm run next:build
62
-
63
- # Terrarium
64
- WORKDIR /usr/src/app
65
- COPY --from=terrarium /usr/src/app/package*.json ./
66
- RUN npm install -g ts-node \
67
- && npm install \
68
- && npm prune --production
69
- COPY --from=terrarium /usr/src/app/. .
70
- ENV ENV_RUN_AS "docker"
71
-
72
- # Ports to expose
73
- EXPOSE 4000/tcp
74
- EXPOSE 8000/tcp
75
- EXPOSE 8090/tcp
76
-
77
- CMD ["/sbin/gcp-entrypoint.sh"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Cohere
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/Makefile DELETED
@@ -1,180 +0,0 @@
1
- # ------------------ BACKEND ------------------
2
- # Build & Run
3
- .PHONY: dev
4
- dev:
5
- make check-config
6
- make -j 2 watch up
7
-
8
- .PHONY: watch
9
- watch:
10
- @docker compose watch --no-up
11
-
12
- .PHONY: up
13
- up:
14
- @docker compose up --build
15
-
16
- .PHONY: down
17
- down:
18
- @docker compose down
19
-
20
- .PHONY: attach
21
- attach:
22
- @docker attach cohere-toolkit-backend-1
23
-
24
- .PHONY: logs
25
- logs:
26
- @@docker compose logs --follow --tail 100 $(service)
27
-
28
- .PHONY: exec-backend
29
- exec-backend:
30
- docker exec -ti cohere-toolkit-backend-1 bash
31
-
32
- .PHONY: exec-db
33
- exec-db:
34
- docker exec -ti cohere-toolkit-db-1 bash
35
-
36
- .PHONY: exec-terrarium
37
- exec-terrarium:
38
- docker exec -ti -u root cohere-toolkit-terrarium-1 /bin/sh
39
-
40
- # Testing & Linting
41
- .PHONY: run-unit-tests
42
- run-unit-tests:
43
- poetry run pytest -n auto src/backend/tests/unit/$(file) --cov=src/backend --cov-report=xml
44
-
45
- .PHONY: run-unit-tests-debug
46
- run-unit-tests-debug:
47
- poetry run pytest src/backend/tests/unit/$(file) --cov=src/backend --cov-report=xml
48
-
49
- .PHONY: run-community-tests
50
- run-community-tests:
51
- poetry run pytest -n auto src/community/tests/$(file) --cov=src/community --cov-report=xml
52
-
53
- .PHONY: run-community-tests-debug
54
- run-community-tests-debug:
55
- poetry run pytest src/community/tests/$(file) --cov=src/community --cov-report=xml
56
-
57
- .PHONY: run-integration-tests
58
- run-integration-tests:
59
- poetry run pytest -c src/backend/pytest_integration.ini src/backend/tests/integration/$(file)
60
-
61
- .PHONY: test-db
62
- test-db:
63
- docker compose stop test_db
64
- docker compose rm -f test_db
65
- docker compose up test_db -d
66
-
67
- .PHONY: typecheck
68
- typecheck:
69
- poetry run pyright
70
-
71
- .PHONY: lint
72
- lint:
73
- poetry run ruff check
74
-
75
- .PHONY: lint-fix
76
- lint-fix:
77
- poetry run ruff check --fix
78
-
79
- # Database management
80
- .PHONY: migration
81
- migration:
82
- docker compose run --build backend alembic -c src/backend/alembic.ini revision --autogenerate -m "$(message)"
83
-
84
- .PHONY: migrate
85
- migrate:
86
- docker compose run --build backend alembic -c src/backend/alembic.ini upgrade head
87
-
88
- .PHONY: downgrade
89
- downgrade:
90
- docker compose run --build backend alembic -c src/backend/alembic.ini downgrade -1
91
-
92
- .PHONY: reset-db
93
- reset-db:
94
- docker compose down
95
- docker volume rm cohere_toolkit_db
96
-
97
- # Setup
98
- .PHONY: install
99
- install:
100
- poetry install --verbose --with dev
101
-
102
- .PHONY: setup
103
- setup:
104
- poetry install --with setup,dev --verbose
105
- poetry run python3 src/backend/scripts/cli/main.py
106
-
107
- .PHONY: setup-use-community
108
- setup-use-community:
109
- poetry install --with setup,community --verbose
110
- poetry run python3 src/backend/scripts/cli/main.py --use-community
111
-
112
- .PHONY: win-setup
113
- win-setup:
114
- poetry install --with setup --verbose
115
- poetry run python src/backend/scripts/cli/main.py
116
-
117
- .PHONY: check-config-install
118
- check-config-install:
119
- poetry install --with setup --verbose
120
- poetry run python src/backend/scripts/config/check_config.py
121
-
122
- .PHONY: check-config
123
- check-config:
124
- poetry run python src/backend/scripts/config/check_config.py
125
-
126
- .PHONY: first-run
127
- first-run:
128
- make setup
129
- make migrate
130
- make dev
131
-
132
- .PHONY: win-first-run
133
- win-first-run:
134
- make win-setup
135
- make migrate
136
- make dev
137
-
138
- # ------------------ FRONTEND ------------------
139
- # Assistants Web
140
- .PHONY: format-web
141
- format-web:
142
- cd src/interfaces/assistants_web && npm run format:write
143
-
144
- .PHONY: generate-client-web
145
- generate-client-web:
146
- cd src/interfaces/assistants_web && npm run generate:client && npm run format:write
147
-
148
- .PHONY: install-web
149
- install-web:
150
- cd src/interfaces/assistants_web && npm install
151
-
152
- .PHONY: build-web
153
- build-web:
154
- cd src/interfaces/assistants_web && npm run build
155
-
156
- # Coral Web
157
- .PHONY: format-coral
158
- format-coral:
159
- cd src/interfaces/coral_web && npm run format:write
160
-
161
- .PHONY: generate-client-coral
162
- generate-client-coral:
163
- cd src/interfaces/coral_web && npm run generate:client && npm run format:write
164
-
165
- .PHONY: install-coral
166
- install-coral:
167
- cd src/interfaces/coral_web && npm install
168
-
169
- .PHONY: build-coral
170
- build-coral:
171
- cd src/interfaces/coral_web && npm run build
172
-
173
- # Debugging
174
- .PHONY: vscode-debug
175
- vscode-debug:
176
- @DEBUGGER_IDE=vscode docker compose -f docker-compose.debug.yml up --build
177
-
178
- .PHONY: pycharm-debug
179
- pycharm-debug:
180
- @DEBUGGER_IDE=pycharm docker compose -f docker-compose.debug.yml up --build
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/README.md DELETED
@@ -1,91 +0,0 @@
1
- ![](/docs/assets/banner.png)
2
-
3
- # Cohere Toolkit
4
-
5
- Toolkit is a deployable all-in-one RAG application that enables users to quickly build their LLM-based product.
6
-
7
- - [Try Toolkit](#try-now)
8
- - [About Toolkit](#about-toolkit)
9
- - [Toolkit Setup](/docs/setup.md)
10
- - [Troubleshooting](/docs/troubleshooting.md)
11
- - [How to guides](/docs/how_to_guides.md)
12
- - [How to set up command model providers](/docs/command_model_providers.md)
13
- - [How to add tools](/docs/custom_tool_guides/tool_guide.md)
14
- - [How to add auth to your tools](/docs/custom_tool_guides/tool_auth_guide.md)
15
- - [How to setup Google Drive](/docs/custom_tool_guides/google_drive.md)
16
- - [How to setup Gmail](/docs/custom_tool_guides/gmail.md)
17
- - [How to setup Slack Tool](/docs/custom_tool_guides/slack.md)
18
- - [How to setup Github Tool](/docs/custom_tool_guides/github.md)
19
- - [How to setup Sharepoint](/docs/custom_tool_guides/sharepoint.md)
20
- - [How to setup Google Text-to-Speech](/docs/text_to_speech.md)
21
- - [How to add authentication](/docs/auth_guide.md)
22
- - [How to deploy toolkit services](/docs/service_deployments.md)
23
- - [How to debug dockerized Toolkit API with VSCode/PyCharm](/docs/debugging.md)
24
- - [How to set up Github Actions for automated DB migrations](/docs/github_migrations_action.md)
25
- - [How to customize the theme](/docs/theming.md)
26
- - [How to contribute](#contributing)
27
- - [Try Cohere's Command Showcase](https://coral.cohere.com/)
28
-
29
- ![](/docs/assets/toolkit.gif)
30
-
31
- ## Try Now:
32
-
33
- There are two main ways for quickly running Toolkit: local and cloud. See the specific instructions given below.
34
-
35
- ### Local
36
-
37
- _You will need to have [Docker](https://www.docker.com/products/docker-desktop/), [Docker-compose >= 2.22](https://docs.docker.com/compose/install/), and [Poetry](https://python-poetry.org/docs/#installation) installed. [Go here for a more detailed setup.](/docs/setup.md)_
38
- Note: to include community tools when building locally, set the `INSTALL_COMMUNITY_DEPS` build arg in the `docker-compose.yml` to `true`.
39
-
40
- Both options will serve the frontend at http://localhost:4000.
41
-
42
- #### Using `make`
43
-
44
- Use the provided Makefile to simplify and automate your development workflow with Cohere Toolkit, including Docker Compose management, testing, linting, and environment setup.
45
-
46
- ```bash
47
- git clone https://github.com/cohere-ai/cohere-toolkit.git
48
- cd cohere-toolkit
49
- make first-run
50
- ```
51
-
52
- #### Docker Compose only
53
-
54
- Use Docker Compose directly if you want to quickly spin up and manage your container environment without the additional automation provided by the Makefile.
55
-
56
- ```bash
57
- git clone https://github.com/cohere-ai/cohere-toolkit.git
58
- cd cohere-toolkit
59
- docker compose up
60
- docker compose run --build backend alembic -c src/backend/alembic.ini upgrade head
61
- ```
62
-
63
- ### Cloud
64
-
65
- #### GitHub Codespaces
66
-
67
- To run this project using GitHub Codespaces, please refer to our [Codespaces Setup Guide](/docs/github_codespaces.md).
68
-
69
- ## About Toolkit
70
-
71
- ![](/docs/assets/toolkit_graphic.png)
72
-
73
- - **Interfaces** - any client-side UI, currently contains two web apps, one agentic and one basic, and a Slack bot implementation.
74
- - Defaults to Cohere's Web UI at `src/interfaces/assistants_web` - A web app built in Next.js. Includes a simple SQL database out of the box to store conversation history in the app.
75
- - You can change the Web UI using the docker compose file.
76
- - **Backend API** - in `src/backend` this follows a similar structure to the [Cohere Chat API](https://docs.cohere.com/reference/chat) but also include customizable elements:
77
- - **Model** - you can customize with which provider you access Cohere's Command models. By default included in the toolkit is Cohere's Platform, Sagemaker, Azure, Bedrock, HuggingFace, local models. [More details here.](/docs/command_model_providers.md)
78
- - **Retrieval**- you can customize tools and data sources that the application is run with.
79
- - **Service Deployment Guides** - we also include guides for how to deploy the toolkit services in production including with AWS, GCP and Azure. [More details here.](/docs/service_deployments.md)
80
-
81
- ## Contributing
82
-
83
- Contributions are what drive an open source community, any contributions made are greatly appreciated. To get started, check out our [documentation.](CONTRIBUTING.md)
84
-
85
- ## Contributors
86
-
87
- <a href="https://github.com/cohere-ai/cohere-toolkit/graphs/contributors">
88
- <img src="https://contrib.rocks/image?repo=cohere-ai/cohere-toolkit" />
89
- </a>
90
-
91
- Made with [contrib.rocks](https://contrib.rocks).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/app.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "name": "toolkit-deploy",
3
- "env": {
4
- "DATABASE_URL": {
5
- "description": "URL for your Postgres database"
6
- },
7
- "COHERE_API_KEY": {
8
- "description": "Your Cohere API key"
9
- },
10
- "INSTALL_COMMUNITY_DEPS": {
11
- "description": "Whether to enable community features true/false"
12
- }
13
- },
14
- "hooks": {
15
- "prebuild": {
16
- "commands": [
17
- "gcloud auth configure-docker"
18
- ]
19
- },
20
- "postcreate": {
21
- "commands": [
22
- "chmod +x ./gcp_postcreate_hook.sh",
23
- "./gcp_postcreate_hook.sh"
24
- ]
25
- }
26
- },
27
- "options": {
28
- "allow-unauthenticated": true,
29
- "memory": "12288Mi",
30
- "cpu": "4",
31
- "port": 4000,
32
- "max-instances": 2
33
- }
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-api.Dockerfile DELETED
@@ -1,48 +0,0 @@
1
- FROM python:3.11
2
-
3
- # Keeps Python from generating .pyc files in the container
4
- # Turns off buffering for easier container logging
5
- # Force UTF8 encoding for funky character handling
6
- # Needed so imports function properly
7
- ENV PYTHONDONTWRITEBYTECODE=1
8
- ENV PYTHONUNBUFFERED=1
9
- ENV PYTHONIOENCODING=utf-8
10
- ENV PYTHONPATH=/workspace/src/
11
- # Keep the venv name and location predictable
12
- ENV POETRY_VIRTUALENVS_IN_PROJECT=true
13
-
14
- # "Activate" the venv manually for the context of the container
15
- ENV VIRTUAL_ENV=/workspace/.venv
16
- ENV PATH="$VIRTUAL_ENV/bin:$PATH"
17
-
18
- WORKDIR /workspace
19
-
20
- # Need to expose port in ENV to use in CMD
21
- ARG PORT=8000
22
- ENV PORT=${PORT}
23
-
24
- # Build with community packages
25
- ARG INSTALL_COMMUNITY_DEPS
26
-
27
- # Copy dependency files to avoid cache invalidations
28
- COPY ./pyproject.toml poetry.lock ./
29
-
30
- # Install poetry
31
- RUN pip install --no-cache-dir poetry==1.8.4
32
-
33
- # Conditional installation of dependencies
34
- RUN if [ "$INSTALL_COMMUNITY_DEPS" = "true" ]; then \
35
- poetry install --with dev,community; \
36
- else \
37
- poetry install --with dev; \
38
- fi
39
-
40
- COPY src/backend src/backend/
41
- COPY src/community src/community/
42
-
43
- # Copy environment variables optionally
44
- # IMPORTANT: Can't be put in the docker-compose, will break tests
45
- COPY .en[v] .env
46
-
47
- EXPOSE ${PORT}
48
- CMD uvicorn backend.main:app --reload --host 0.0.0.0 --port ${PORT} --timeout-keep-alive 300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-db.Dockerfile DELETED
@@ -1 +0,0 @@
1
- FROM postgres:14.11-alpine
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-fe.Dockerfile DELETED
@@ -1,31 +0,0 @@
1
- FROM node:20-alpine AS base
2
-
3
- WORKDIR /app
4
-
5
- # Install dependencies based on the preferred package manager
6
- COPY package.json package-lock.json ./
7
- RUN npm ci
8
-
9
- COPY src ./src
10
- COPY public ./public
11
- COPY next.config.mjs .
12
- COPY tsconfig.json .
13
- COPY tailwind.config.js .
14
- COPY postcss.config.js .
15
- COPY .en[v] .env
16
-
17
- # Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
18
- # Uncomment the following line to disable telemetry at run time
19
- # ENV NEXT_TELEMETRY_DISABLED 1
20
-
21
- # Note: Don't expose ports here, Compose will handle that for us
22
-
23
- # Start Next.js in development mode based on the preferred package manager
24
- FROM base as dev
25
- CMD npm run dev
26
-
27
-
28
- # Production specifc tareget
29
- FROM base AS prod
30
- RUN npm run build
31
- CMD npm run start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-nginx.Dockerfile DELETED
@@ -1,8 +0,0 @@
1
- FROM nginx:alpine
2
-
3
- RUN rm -f /etc/nginx/conf.d/*
4
- ADD aws_copilot_deploy/nginx.conf /etc/nginx/nginx.conf
5
-
6
- EXPOSE 8090
7
-
8
- CMD [ "nginx" , "-g" , "daemon off;" ]
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws-terrarium.Dockerfile DELETED
@@ -1,5 +0,0 @@
1
- FROM ghcr.io/cohere-ai/terrarium:latest
2
-
3
- EXPOSE 8080
4
-
5
-
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws_cleanup.sh DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
- # Delete the app
4
- copilot app delete
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/aws_deploy.sh DELETED
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
- # Backend App
4
- copilot app init toolkit-app
5
- copilot env init -n dev --profile default --default-config
6
- copilot svc init --name toolkit-app-db --svc-type "Backend Service" --dockerfile ./aws_copilot_deploy/aws-db.Dockerfile --port 5432
7
- copilot svc init --name toolkit-app-terrarium --svc-type "Backend Service" --dockerfile ./aws_copilot_deploy/aws-terrarium.Dockerfile --port 8080
8
- copilot svc init --name toolkit-app-api --svc-type "Backend Service" --dockerfile ./aws_copilot_deploy/aws-api.Dockerfile --port 8000
9
- copilot svc init --name toolkit-app-fe --svc-type "Backend Service" --dockerfile ./aws_copilot_deploy/aws-fe.Dockerfile --port 4000
10
- copilot svc init --name toolkit-app-nginx --svc-type "Load Balanced Web Service" --dockerfile ./aws_copilot_deploy/aws-nginx.Dockerfile --port 8090
11
-
12
- copilot env deploy --name dev
13
- copilot svc deploy --name toolkit-app-db --env dev
14
- copilot svc deploy --name toolkit-app-terrarium --env dev
15
- copilot svc deploy --name toolkit-app-api --env dev
16
- copilot svc exec -a toolkit-app -e dev --name toolkit-app-api --command "alembic -c src/backend/alembic.ini upgrade head"
17
- copilot svc deploy --name toolkit-app-fe --env dev
18
- copilot svc deploy --name toolkit-app-nginx --env dev
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/aws_copilot_deploy/nginx.conf DELETED
@@ -1,83 +0,0 @@
1
- user nginx;
2
- worker_processes auto;
3
- pid /var/run/nginx.pid;
4
-
5
- events {
6
- worker_connections 768;
7
- # multi_accept on;
8
- }
9
-
10
- http {
11
-
12
- ##
13
- # Basic Settings
14
- ##
15
-
16
- sendfile on;
17
- tcp_nopush on;
18
- tcp_nodelay on;
19
- keepalive_timeout 65;
20
- types_hash_max_size 2048;
21
- client_max_body_size 50M;
22
- # server_tokens off;
23
-
24
- # server_names_hash_bucket_size 64;
25
- # server_name_in_redirect off;
26
-
27
- include /etc/nginx/mime.types;
28
- default_type application/octet-stream;
29
-
30
- upstream backend {
31
- server toolkit-app-api.dev.toolkit-app.local:8000;
32
- }
33
-
34
- upstream frontend {
35
- server toolkit-app-fe.dev.toolkit-app.local:4000;
36
- }
37
-
38
- server {
39
- listen 8090 default_server;
40
- listen [::]:8090 default_server;
41
-
42
- location /api {
43
- rewrite /api/(.*) /$1 break;
44
- proxy_pass http://backend;
45
- proxy_redirect off;
46
- proxy_set_header Host $host;
47
- proxy_set_header X-Real-IP $remote_addr;
48
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49
- proxy_set_header X-Forwarded-Host $server_name;
50
- }
51
-
52
- location / {
53
- proxy_pass http://frontend;
54
- proxy_redirect off;
55
- proxy_set_header Host $host;
56
- proxy_set_header X-Real-IP $remote_addr;
57
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
58
- proxy_set_header X-Forwarded-Host $server_name;
59
- }
60
- }
61
-
62
- ##
63
- # SSL Settings
64
- ##
65
-
66
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
67
- ssl_prefer_server_ciphers on;
68
-
69
- ##
70
- # Logging Settings
71
- ##
72
-
73
- access_log /var/log/nginx/access.log;
74
- error_log /var/log/nginx/error.log;
75
-
76
- ##
77
- # Gzip Settings
78
- ##
79
-
80
- gzip on;
81
-
82
- include /etc/nginx/conf.d/*.conf;
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/azure_compose_deploy/api_entrypoint.sh DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
-
3
- poetry run alembic -c src/backend/alembic.ini upgrade head
4
- exec uvicorn backend.main:app --workers=4 --host 0.0.0.0 --port ${PORT} --timeout-keep-alive 300
 
 
 
 
 
global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-api.Dockerfile DELETED
@@ -1,52 +0,0 @@
1
- FROM python:3.11
2
-
3
- # Keeps Python from generating .pyc files in the container
4
- # Turns off buffering for easier container logging
5
- # Force UTF8 encoding for funky character handling
6
- # Needed so imports function properly
7
- ENV PYTHONDONTWRITEBYTECODE=1
8
- ENV PYTHONUNBUFFERED=1
9
- ENV PYTHONIOENCODING=utf-8
10
- ENV PYTHONPATH=/workspace/src/
11
- # Keep the venv name and location predictable
12
- ENV POETRY_VIRTUALENVS_IN_PROJECT=true
13
-
14
- # "Activate" the venv manually for the context of the container
15
- ENV VIRTUAL_ENV=/workspace/.venv
16
- ENV PATH="$VIRTUAL_ENV/bin:$PATH"
17
-
18
- WORKDIR /workspace
19
-
20
- # Need to expose port in ENV to use in CMD
21
- ARG PORT=8000
22
- ENV PORT=${PORT}
23
-
24
- # Build with community packages
25
- ARG INSTALL_COMMUNITY_DEPS
26
-
27
- # Copy dependency files to avoid cache invalidations
28
- COPY ./pyproject.toml poetry.lock ./
29
- COPY ./azure_compose_deploy/api_entrypoint.sh ./
30
-
31
- # Install poetry
32
- RUN pip install --no-cache-dir poetry==1.8.4
33
-
34
- # Conditional installation of dependencies
35
- RUN if [ "$INSTALL_COMMUNITY_DEPS" = "true" ]; then \
36
- poetry install --with dev,community; \
37
- else \
38
- poetry install --with dev; \
39
- fi
40
-
41
- COPY src/backend src/backend/
42
- COPY src/community src/community/
43
- COPY azure_compose_deploy/configuration.yaml src/backend/config/configuration.yaml
44
- COPY azure_compose_deploy/secrets.yaml src/backend/config/secrets.yaml
45
- # Copy environment variables optionally
46
- # IMPORTANT: Can't be put in the docker-compose, will break tests
47
- #COPY .en[v] .env
48
-
49
-
50
- EXPOSE ${PORT}
51
- ENTRYPOINT ["/workspace/api_entrypoint.sh"]
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-db.Dockerfile DELETED
@@ -1,2 +0,0 @@
1
- FROM postgres:14.11-alpine
2
- EXPOSE 5432
 
 
 
global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-fe.Dockerfile DELETED
@@ -1,31 +0,0 @@
1
- FROM node:20-alpine AS base
2
-
3
- WORKDIR /app
4
-
5
- # Install dependencies based on the preferred package manager
6
- COPY package.json package-lock.json ./
7
- RUN npm ci
8
-
9
- COPY src ./src
10
- COPY public ./public
11
- COPY next.config.mjs .
12
- COPY tsconfig.json .
13
- COPY tailwind.config.js .
14
- COPY postcss.config.js .
15
-
16
- # Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
17
- # Uncomment the following line to disable telemetry at run time
18
- # ENV NEXT_TELEMETRY_DISABLED 1
19
-
20
- EXPOSE 4000
21
-
22
-
23
- # Start Next.js in development mode based on the preferred package manager
24
- FROM base as dev
25
- CMD npm run dev
26
-
27
-
28
- # Production specifc tareget
29
- FROM base AS prod
30
- RUN npm run build
31
- CMD npm run start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
global_ai/canada/cohere-toolkit/azure_compose_deploy/azure-nginx.Dockerfile DELETED
@@ -1,8 +0,0 @@
1
- FROM nginx:alpine
2
-
3
- RUN rm -f /etc/nginx/conf.d/*
4
- ADD azure_compose_deploy/nginx.conf /etc/nginx/nginx.conf
5
-
6
- EXPOSE 80
7
-
8
- CMD [ "nginx" , "-g" , "daemon off;" ]