mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-09 11:48:47 +00:00
FIX: triage no longer working with claude (#369)
This commit is contained in:
parent
5a84969c96
commit
8664771b7f
@ -31,12 +31,19 @@ module DiscourseAi
|
||||
result = nil
|
||||
|
||||
llm = DiscourseAi::Completions::Llm.proxy(model)
|
||||
key =
|
||||
if model.include?("claude")
|
||||
:max_tokens_to_sample
|
||||
else
|
||||
:max_tokens
|
||||
end
|
||||
|
||||
prompt = {
|
||||
insts: filled_system_prompt,
|
||||
params: {
|
||||
model => {
|
||||
max_tokens: (llm.tokenizer.tokenize(search_for_text).length * 2 + 10),
|
||||
temperature: 0,
|
||||
key => (llm.tokenizer.tokenize(search_for_text).length * 2 + 10),
|
||||
:temperature => 0,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user