DEV: Remove the short-lived prompt for locale detection
This commit is contained in:
parent
54ebbbe769
commit
f10af7b167
|
@ -8,7 +8,6 @@ class CompletionPrompt < ActiveRecord::Base
|
|||
CUSTOM_PROMPT = -305
|
||||
EXPLAIN = -306
|
||||
ILLUSTRATE_POST = -308
|
||||
DETECT_TEXT_LOCALE = -309
|
||||
|
||||
enum :prompt_type, { text: 0, list: 1, diff: 2 }
|
||||
|
||||
|
|
|
@ -200,20 +200,3 @@ CompletionPrompt.seed do |cp|
|
|||
cp.prompt_type = CompletionPrompt.prompt_types[:list]
|
||||
cp.messages = {}
|
||||
end
|
||||
|
||||
CompletionPrompt.seed do |cp|
|
||||
cp.id = -309
|
||||
cp.name = "detect_text_locale"
|
||||
cp.prompt_type = CompletionPrompt.prompt_types[:text]
|
||||
cp.messages = {
|
||||
insts: <<~TEXT,
|
||||
I want you to act as a language expert, determining the locale for a set of text.
|
||||
The locale is a language identifier, such as "en" for English, "de" for German, etc,
|
||||
and can also include a region identifier, such as "en-GB" for British English, or "zh-Hans" for Simplified Chinese.
|
||||
I will provide you with text, and you will determine the locale of the text.
|
||||
You will find the text between <input></input> XML tags.
|
||||
Include your locale between <output></output> XML tags.
|
||||
TEXT
|
||||
examples: [["<input>Hello my favourite colour is red</input>", "<output>en-GB</output>"]],
|
||||
}
|
||||
end
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveDetectTextLocalePrompt < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
execute "DELETE FROM completion_prompts WHERE id = -309"
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue