Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 10x 10x 10x 10x 10x 10x 10x 10x 11x 11x 4x 7x 7x | import { BaseModelAdapter } from "./base";
export class GlmAdapter extends BaseModelAdapter {
readonly idPattern = /(^|[\/_-])glm([\/_-]|$)/i;
readonly defaultTemperature = 0.1;
readonly toolTemperature = 0.05;
readonly toolSystemMessage =
"You are an expert AI programming assistant. Provide correct, concise, production-ready code. When calling tools, emit strict JSON arguments only. Do not wrap tool arguments in markdown fences, backticks, or explanatory prose.";
readonly supportedReasoningModes = ["none", "on"];
readonly reasoningParameterFormat = "chat_template_kwargs" as const;
applyReasoningMode(request: import("../../types").NimChatRequest, mode: string): void {
request.chat_template_kwargs = request.chat_template_kwargs || {};
if (mode === "none") {
request.chat_template_kwargs.enable_thinking = false;
} else {
request.chat_template_kwargs.enable_thinking = true;
request.chat_template_kwargs.clear_thinking = false;
}
}
}
|