model temperature settings

This commit is contained in:
Storme-bit
2026-04-18 02:40:31 -07:00
parent 9950ea3b62
commit 8bd4836cd7
4 changed files with 21 additions and 5 deletions

View File

@@ -126,7 +126,7 @@ async function getRelevantEntities(userMessage) {
}
async function chat(externalId, userMessage, options = {}) {
const { recentEpisodeLimit, semanticLimit, scoreThreshold } =
const { recentEpisodeLimit, semanticLimit, scoreThreshold, temperature} =
appSettings.load();
// 1. Resolve or create session
let session = await memory.getSessionByExternalId(externalId);
@@ -187,7 +187,7 @@ async function chat(externalId, userMessage, options = {}) {
);
// 5. Run inference
const result = await inference.complete(prompt, options);
const result = await inference.complete(prompt, {...options, temperature});
// 6. Write episode back to memory
memory
@@ -217,7 +217,7 @@ async function chat(externalId, userMessage, options = {}) {
async function chatStream(externalId, userMessage, onChunk, options = {}) {
try {
const { recentEpisodeLimit, semanticLimit, scoreThreshold } = appSettings.load();
const { recentEpisodeLimit, semanticLimit, scoreThreshold, temperature } = appSettings.load();
let session = await memory.getSessionByExternalId(externalId);
if (!session) session = await memory.createSession(externalId);
@@ -270,7 +270,7 @@ async function chatStream(externalId, userMessage, onChunk, options = {}) {
entities,
userMessage,
);
const res = await inference.completeStream(prompt, options);
const res = await inference.completeStream(prompt, {...options, temperature});
let fullText = "";
let model = "";

View File

@@ -8,7 +8,8 @@ const DEFAULTS = {
recentEpisodeLimit: ORCHESTRATION.RECENT_EPISODE_LIMIT,
semanticLimit: ORCHESTRATION.SEMANTIC_LIMIT,
scoreThreshold: ORCHESTRATION.SCORE_THRESHOLD,
modelsFolderPath: getEnv('MODELS_MANIFEST_PATH', '/mnt/nexus-models')
modelsFolderPath: getEnv('MODELS_MANIFEST_PATH', '/mnt/nexus-models'),
temperature: ORCHESTRATION.TEMPERATURE
};
function load() {