dimagi / open-chat-studio

A web based platform for building Chatbots backed by Large Language Models
BSD 3-Clause "New" or "Revised" License
16 stars 7 forks source link

Management command to bootstrap versions for a team #871

Closed snopoke closed 1 week ago

snopoke commented 1 week ago

Description

./manage.py enable_versioning_for_team --help

usage: manage.py enable_versioning_for_team [-h] [--force] [--continue-on-error] team

positional arguments:
  team                  The team slug to enable versioning for.

options:
  --force               Force enable versioning.
  --continue-on-error   Continue creating versions even if an error occurs.

This will create versions for all experiments in the team (that don't already have versions) and add the team to the feature flag.

It will stop if there are any errors unless the continue-on-error flag is set.

Use --force to run this for a team that already has the feature flag enabled.

Bonus

When I ran this locally it gave some errors when syncing tools to OpenAI. This was caused by a change I made recently to use 'strict' mode which some of our tools don't support. For now I've disabled strict mode if the tool doesn't support it.

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 83.33333% with 4 lines in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/assistants/sync.py 85.71% 2 Missing :warning:
apps/teams/models.py 77.77% 2 Missing :warning:
Additional details and impacted files

:loudspeaker: Thoughts on this report? Let us know!