ドキュメント
エージェントフロー
インテグレーション
テキスト埋め込み
トークン化
モデル情報
エージェントフロー
インテグレーション
テキスト埋め込み
トークン化
モデル情報
インテグレーション
設定へのアクセス
プラグインサポートは現在プライベートベータ版です。こちらからベータ版に参加してください。
それぞれ、メソッド ctl.getPluginConfig(configSchematics) および ctl.getGlobalConfig(globalConfigSchematics) を使用して設定にアクセスできます。
例えば、promptPreprocessor内で設定にアクセスする方法は次のとおりです。
import { type PreprocessorController, type ChatMessage } from "@lmstudio/sdk";
import { configSchematics } from "./config";
export async function preprocess(ctl: PreprocessorController, userMessage: ChatMessage) {
const pluginConfig = ctl.getPluginConfig(configSchematics);
const myCustomField = pluginConfig.get("myCustomField");
const globalPluginConfig = ctl.getGlobalPluginConfig(configSchematics);
const globalMyCustomField = globalPluginConfig.get("myCustomField");
return (
`${userMessage.getText()},` +
`myCustomField: ${myCustomField}, ` +
`globalMyCustomField: ${globalMyCustomField}`
);
}
このページのソースは GitHub で利用可能です。