Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ part 'ollama_setting_bloc.freezed.dart';

const kDefaultChatModel = 'llama3.1:latest';
const kDefaultEmbeddingModel = 'nomic-embed-text:latest';
const kDefaultOllamaServerUrl = 'http://localhost:11434';

/// llmman (https://github.com/llmmanorg/llmman) serves the Ollama API on 17434.
const kDefaultLlmmanServerUrl = 'http://localhost:17434';

/// Extension methods to map between PB and UI models
class OllamaSettingBloc extends Bloc<OllamaSettingEvent, OllamaSettingState> {
Expand Down Expand Up @@ -227,7 +231,8 @@ extension on LocalAISettingPB {
List<SettingItem> toInputItems() => [
SettingItem(
content: serverUrl,
hintText: 'http://localhost:11434',
hintText:
'$kDefaultOllamaServerUrl (Ollama) or $kDefaultLlmmanServerUrl (llmman)',
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
settingType: SettingType.serverUrl,
),
SettingItem(
Expand Down
2 changes: 1 addition & 1 deletion frontend/resources/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@
"menuLabel": "AI Settings",
"keys": {
"enableAISearchTitle": "AI Search",
"aiSettingsDescription": "Choose your preferred model to power AppFlowy AI. Now includes GPT-4o, GPT-o3-mini, DeepSeek R1, Claude 3.5 Sonnet, and models available in Ollama",
"aiSettingsDescription": "Choose your preferred model to power AppFlowy AI. Now includes GPT-4o, GPT-o3-mini, DeepSeek R1, Claude 3.5 Sonnet, and models available in Ollama or llmman",
"loginToEnableAIFeature": "AI features are only enabled after logging in with @:appName Cloud. If you don't have an @:appName account, go to 'My Account' to sign up",
"llmModel": "Language Model",
"globalLLMModel": "Global Language Model",
Expand Down
3 changes: 3 additions & 0 deletions frontend/rust-lib/flowy-ai/src/local_ai/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ use uuid::Uuid;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LocalAISetting {
/// Base URL of any Ollama-API server: Ollama (`http://localhost:11434`) or
/// llmman (https://github.com/llmmanorg/llmman, `http://localhost:17434`).
/// The server must list both the chat and embedding models in `/api/tags`.
pub ollama_server_url: String,
pub chat_model_name: String,
pub embedding_model_name: String,
Expand Down
Loading