Skip to content

Commit

Permalink
Bugfix Issue 259 - HARD Fix using local Ollama usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dctfor committed Nov 16, 2024
1 parent b7d609d commit 87064f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/.server/llm/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function getOllamaModel(baseURL: string, model: string) {
numCtx: 32768,
});

Ollama.config.baseURL = `${baseURL}/api`;
Ollama.config.baseURL = `http://127.0.0.1:11434/api`;
return Ollama;
}

Expand Down
5 changes: 4 additions & 1 deletion app/lib/.server/llm/stream-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ export function streamText(

return message; // No changes for non-user messages
});

currentModel = 'llama3.1:8b';
console.log('Processed messages:', processedMessages);
console.log('Current model:', currentModel);
console.log('Current provider:', currentProvider);
return _streamText({
model: getModel(currentProvider, currentModel, env, apiKeys),
system: getSystemPrompt(),
Expand Down

0 comments on commit 87064f7

Please sign in to comment.