mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-17 11:46:28 +08:00
* FEATURE: allows forced LLM tool use Sometimes we need to force LLMs to use tools, for example in RAG like use cases we may want to force an unconditional search. The new framework allows you backend to force tool usage. Front end commit to follow * UI for forcing tools now works, but it does not react right * fix bugs * fix tests, this is now ready for review
18 lines
460 B
JavaScript
18 lines
460 B
JavaScript
import { computed, observer } from "@ember/object";
|
|
import MultiSelectComponent from "select-kit/components/multi-select";
|
|
|
|
export default MultiSelectComponent.extend({
|
|
_modelDisabledChanged: observer("attrs.disabled", function () {
|
|
this.selectKit.options.set("disabled", this.get("attrs.disabled.value"));
|
|
}),
|
|
|
|
content: computed("tools", function () {
|
|
return this.tools;
|
|
}),
|
|
|
|
value: "",
|
|
|
|
selectKitOptions: {
|
|
filterable: true,
|
|
},
|
|
});
|