Files
discourse-ai/assets/javascripts/discourse/admin/models/ai-llm.js
T
Roman Rizzi 62fc7d6ed0 FEATURE: Configurable LLMs. (#606)
This PR introduces the concept of "LlmModel" as a new way to quickly add new LLM models without making any code changes. We are releasing this first version and will add incremental improvements, so expect changes.

The AI Bot can't fully take advantage of this feature as users are hard-coded. We'll fix this in a separate PR.s
2024-05-13 12:46:42 -03:00

21 lines
375 B
JavaScript

import RestModel from "discourse/models/rest";
export default class AiLlm extends RestModel {
createProperties() {
return this.getProperties(
"display_name",
"name",
"provider",
"tokenizer",
"max_prompt_tokens"
);
}
updateProperties() {
const attrs = this.createProperties();
attrs.id = this.id;
return attrs;
}
}