Skip to content

Migrate Duo Chat tools to use Claude 3

Background

The zero shot executor was updated to send a prompt formatted for the messages API with the ai_claude_3_sonnet feature flag is enabled for the current user here.

Now, we need to migrate the tools to have similar behavior: for users without the feature flag, keep the prompt as-is. For users with the feature flag, format the prompt so that it works for the Messages API / Claude 3.

Definition of done

Each of these tools is updated so that if Feature.enabled?(:ai_claude_3_sonnet, options.fetch(:current_user)), we send an array of messages rather than a string for a prompt.

Also, these tools all now explicitly set MODEL (see this MR). That value should be overridden to be 'claude-3-sonnet-20240229'.

groupai framework :

groupproduct planning:

groupcode creation via Update Code Tasks (Slash Commands) to use Claude 3 (#455717 - closed) • Allen Cook • 17.0 • On track

Edited by Nathan Weinshenker