FEATURE: Tweaks to Anthropic Summarization (#138)
* FEATURE: Tweaks to Anthropic Summarization * fix specs
This commit is contained in:
parent
0738f67fa4
commit
49f2453c2d
|
@ -23,6 +23,7 @@ module DiscourseAi
|
|||
Models::OpenAi.new("gpt-3.5-turbo-16k", max_tokens: 16_384),
|
||||
Models::Discourse.new("long-t5-tglobal-base-16384-book-summary", max_tokens: 16_384),
|
||||
Models::Anthropic.new("claude-2", max_tokens: 100_000),
|
||||
Models::Anthropic.new("claude-instant-1", max_tokens: 100_000),
|
||||
Models::Llama2.new("Llama2-chat-hf", max_tokens: SiteSetting.ai_hugging_face_token_limit),
|
||||
Models::Llama2FineTunedOrcaStyle.new(
|
||||
"StableBeluga2",
|
||||
|
|
|
@ -66,6 +66,8 @@ module DiscourseAi
|
|||
|
||||
base_prompt = <<~TEXT
|
||||
Human: #{initial_instruction}
|
||||
Try to keep the summary in the same languague as the forum discussion.
|
||||
Format the response, including links, using markdown.
|
||||
Include only the summary inside <ai> tags.
|
||||
TEXT
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ RSpec.describe DiscourseAi::Summarization::Models::Anthropic do
|
|||
def expected_messages(contents, opts)
|
||||
base_prompt = <<~TEXT
|
||||
Human: Summarize the following forum discussion inside the given <input> tag.
|
||||
Try to keep the summary in the same languague as the forum discussion.
|
||||
Format the response, including links, using markdown.
|
||||
Include only the summary inside <ai> tags.
|
||||
Try generating links as well the format is #{opts[:resource_path]}.
|
||||
The discussion title is: #{opts[:content_title]}.
|
||||
|
@ -102,6 +104,8 @@ RSpec.describe DiscourseAi::Summarization::Models::Anthropic do
|
|||
|
||||
instructions = <<~TEXT
|
||||
Human: Summarize the following forum discussion inside the given <input> tag.
|
||||
Try to keep the summary in the same languague as the forum discussion.
|
||||
Format the response, including links, using markdown.
|
||||
Include only the summary inside <ai> tags.
|
||||
Try generating links as well the format is #{opts[:resource_path]}.
|
||||
The discussion title is: #{opts[:content_title]}.
|
||||
|
|
Loading…
Reference in New Issue