FEATURE: LLM Triage support for systemless models. (#757)

* FEATURE: LLM Triage support for systemless models.

This change adds support for OSS models without support for system messages. LlmTriage's system message field is no longer mandatory. We now send the post contents in a separate user message.

* Models using Ollama can also disable system prompts
This commit is contained in:
Roman Rizzi
2024-08-21 11:41:55 -03:00
committed by GitHub
parent 97fc822cb6
commit 64641b6175
12 changed files with 138 additions and 42 deletions
@@ -4,7 +4,9 @@ export default DiscourseRoute.extend({
async model(params) {
const allLlms = this.modelFor("adminPlugins.show.discourse-ai-llms");
const id = parseInt(params.id, 10);
return allLlms.findBy("id", id);
const record = allLlms.findBy("id", id);
record.provider_params = record.provider_params || {};
return record;
},
setupController(controller, model) {