const ollama = await pageAssistModel({
  model: selectedModel!,
  baseUrl: cleanUrl(url),
  keepAlive:
    currentChatModelSettings?.keepAlive ?? userDefaultModelSettings?.keepAlive,
  temperature:
    currentChatModelSettings?.temperature ??
    userDefaultModelSettings?.temperature,
  topK: currentChatModelSettings?.topK ?? userDefaultModelSettings?.topK,
  topP: currentChatModelSettings?.topP ?? userDefaultModelSettings?.topP,
  numCtx: currentChatModelSettings?.numCtx ?? userDefaultModelSettings?.numCtx,
  seed: currentChatModelSettings?.seed,
  numGpu: currentChatModelSettings?.numGpu ?? userDefaultModelSettings?.numGpu,
  numPredict:
    currentChatModelSettings?.numPredict ??
    userDefaultModelSettings?.numPredict,
  useMMap:
    currentChatModelSettings?.useMMap ?? userDefaultModelSettings?.useMMap,
  minP: currentChatModelSettings?.minP ?? userDefaultModelSettings?.minP,
  repeatLastN:
    currentChatModelSettings?.repeatLastN ??
    userDefaultModelSettings?.repeatLastN,
  repeatPenalty:
    currentChatModelSettings?.repeatPenalty ??
    userDefaultModelSettings?.repeatPenalty,
  tfsZ: currentChatModelSettings?.tfsZ ?? userDefaultModelSettings?.tfsZ,
  numKeep:
    currentChatModelSettings?.numKeep ?? userDefaultModelSettings?.numKeep,
  numThread:
    currentChatModelSettings?.numThread ?? userDefaultModelSettings?.numThread,
  useMlock:
    currentChatModelSettings?.useMlock ?? userDefaultModelSettings?.useMlock
})
