diff --git a/smart-chat-model/adapters/_custom.js b/smart-chat-model/adapters/_custom.js index 7a87c2fc..eebf1cdd 100644 --- a/smart-chat-model/adapters/_custom.js +++ b/smart-chat-model/adapters/_custom.js @@ -1,4 +1,4 @@ -import { SmartChatModelApiAdapter } from './_api.js'; +import { SmartChatModelApiAdapter, SmartChatModelRequestAdapter } from './_api.js'; // Define local platforms const local_platforms = ['custom_local', 'ollama', 'lm_studio']; @@ -9,6 +9,8 @@ export class SmartChatModelCustomAdapter extends SmartChatModelApiAdapter { type: "API" } + req_adapter = SmartChatModelCustomRequestAdapter; + get settings_config() { return { // LOCAL PLATFORM SETTINGS @@ -58,3 +60,9 @@ export class SmartChatModelCustomAdapter extends SmartChatModelApiAdapter { return true; } } + +export class SmartChatModelCustomRequestAdapter extends SmartChatModelRequestAdapter { + get model() { + return this.adapter.model_config.model_name; + } +}