User customizable context window for ollama models.
This commit is contained in:
parent
115e6b2a71
commit
2bdcbf20fb
10 changed files with 118 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ export const getSuggestions = async (chatHisory: Message[]) => {
|
|||
|
||||
const customOpenAIKey = localStorage.getItem('openAIApiKey');
|
||||
const customOpenAIBaseURL = localStorage.getItem('openAIBaseURL');
|
||||
const ollamaContextWindow = localStorage.getItem('ollamaContextWindow') || '2048';
|
||||
|
||||
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/suggestions`, {
|
||||
method: 'POST',
|
||||
|
|
@ -21,6 +22,9 @@ export const getSuggestions = async (chatHisory: Message[]) => {
|
|||
customOpenAIKey,
|
||||
customOpenAIBaseURL,
|
||||
}),
|
||||
...(chatModelProvider === 'ollama' && {
|
||||
ollamaContextWindow: parseInt(ollamaContextWindow),
|
||||
}),
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue