Support for Ollama context window configuration

This commit is contained in:
Willie Zutz
2025-04-20 01:37:10 -06:00
parent 73b5e8832e
commit c0705d1d9e
10 changed files with 170 additions and 54 deletions

View File

@@ -494,6 +494,8 @@ const sendMessage = async (
}
};
const ollamaContextWindow = localStorage.getItem('ollamaContextWindow') || '2048';
const res = await fetch('/api/chat', {
method: 'POST',
headers: {
@@ -514,6 +516,9 @@ const sendMessage = async (
chatModel: {
name: chatModelProvider.name,
provider: chatModelProvider.provider,
...(chatModelProvider.provider === 'ollama' && {
ollamaContextWindow: parseInt(ollamaContextWindow),
}),
},
embeddingModel: {
name: embeddingModelProvider.name,