Skip to content
Merged
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
18 changes: 11 additions & 7 deletions apps/desktop/src/components/settings/components/ai/llm-view.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { cn } from "@hypr/ui/lib/utils";
import { Trans } from "@lingui/react/macro";
import { Trans, useLingui } from "@lingui/react/macro";
import { useMutation, useQuery } from "@tanstack/react-query";
import { useEffect } from "react";
import { useForm } from "react-hook-form";
Expand Down Expand Up @@ -44,6 +44,7 @@ const endpointSchema = z.object({
export type FormValues = z.infer<typeof endpointSchema>;

export function LLMView() {
const { t } = useLingui();
const customLLMConnection = useQuery({
queryKey: ["custom-llm-connection"],
queryFn: () => connectorCommands.getCustomLlmConnection(),
Expand Down Expand Up @@ -200,13 +201,13 @@ export function LLMView() {
</FormLabel>
<FormDescription className="text-xs">
<Trans>
Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)
Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434)
</Trans>
</FormDescription>
<FormControl>
<Input
{...field}
placeholder="http://localhost:8080/v1"
placeholder="http://localhost:11434"
disabled={!customLLMEnabled.data}
/>
</FormControl>
Expand Down Expand Up @@ -251,7 +252,8 @@ export function LLMView() {
</FormLabel>
<FormDescription className="text-xs">
<Trans>
Select or enter the model name required by your endpoint.
Select a model from the dropdown (if available) or manually enter the model name required by
your endpoint.
</Trans>
</FormDescription>
<FormControl>
Expand Down Expand Up @@ -284,9 +286,11 @@ export function LLMView() {
</Select>
)
: (
<div className="py-1 text-sm text-neutral-500">
<Trans>No models available for this endpoint.</Trans>
</div>
<Input
{...field}
placeholder={t`Enter model name (e.g., gpt-4, llama3.2:3b)`}
disabled={!customLLMEnabled.data}
/>
)}
</FormControl>
<FormMessage />
Expand Down
46 changes: 31 additions & 15 deletions apps/desktop/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ msgstr "Annual"
msgid "Anyone with the link can view this page"
msgstr "Anyone with the link can view this page"

#: src/components/settings/components/ai/llm-view.tsx:199
#: src/components/settings/components/ai/llm-view.tsx:200
msgid "API Base URL"
msgstr "API Base URL"

#: src/components/settings/components/ai/llm-view.tsx:225
#: src/components/settings/components/ai/llm-view.tsx:226
msgid "API Key"
msgstr "API Key"

Expand Down Expand Up @@ -442,7 +442,7 @@ msgstr "Company name"
msgid "Connect"
msgstr "Connect"

#: src/components/settings/components/ai/llm-view.tsx:179
#: src/components/settings/components/ai/llm-view.tsx:180
msgid "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."
msgstr "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."

Expand Down Expand Up @@ -488,7 +488,7 @@ msgstr "Create Note"
msgid "Current Plan"
msgstr "Current Plan"

#: src/components/settings/components/ai/llm-view.tsx:176
#: src/components/settings/components/ai/llm-view.tsx:177
msgid "Custom Endpoint"
msgstr "Custom Endpoint"

Expand Down Expand Up @@ -551,13 +551,25 @@ msgstr "Enhancing"
msgid "Enter a section title"
msgstr "Enter a section title"

#: src/components/settings/components/ai/llm-view.tsx:228
#: src/components/settings/components/ai/llm-view.tsx:291
msgid "Enter model name (e.g., gpt-4, llama3.2:3b)"
msgstr "Enter model name (e.g., gpt-4, llama3.2:3b)"

#: src/components/settings/components/ai/llm-view.tsx:229
msgid "Enter the API key for your custom LLM endpoint"
msgstr "Enter the API key for your custom LLM endpoint"

#: src/components/settings/components/ai/llm-view.tsx:202
msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"
msgstr "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"
#: src/components/settings/components/ai/llm-view.tsx:203
msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434)"
msgstr "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434)"

#: src/components/settings/components/ai/llm-view.tsx:203
#~ msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434/v1)"
#~ msgstr "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434/v1)"

#: src/components/settings/components/ai/llm-view.tsx:203
#~ msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"
#~ msgstr "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"

#: src/components/settings/views/ai.tsx:498
#~ msgid "Enter the exact model name required by your endpoint (if applicable)."
Expand Down Expand Up @@ -681,7 +693,7 @@ msgstr "LinkedIn username"
msgid "Live summary of the meeting"
msgstr "Live summary of the meeting"

#: src/components/settings/components/ai/llm-view.tsx:261
#: src/components/settings/components/ai/llm-view.tsx:263
msgid "Loading available models..."
msgstr "Loading available models..."

Expand Down Expand Up @@ -723,7 +735,7 @@ msgstr "Members"
msgid "Microphone Access"
msgstr "Microphone Access"

#: src/components/settings/components/ai/llm-view.tsx:250
#: src/components/settings/components/ai/llm-view.tsx:251
msgid "Model Name"
msgstr "Model Name"

Expand Down Expand Up @@ -761,8 +773,8 @@ msgid "No members found"
msgstr "No members found"

#: src/components/settings/components/ai/llm-view.tsx:288
msgid "No models available for this endpoint."
msgstr "No models available for this endpoint."
#~ msgid "No models available for this endpoint."
#~ msgstr "No models available for this endpoint."

#: src/components/editor-area/note-header/chips/event-chip.tsx:302
msgid "No past events found."
Expand Down Expand Up @@ -919,6 +931,10 @@ msgstr "Search..."
msgid "Sections"
msgstr "Sections"

#: src/components/settings/components/ai/llm-view.tsx:254
msgid "Select a model from the dropdown (if available) or manually enter the model name required by your endpoint."
msgstr "Select a model from the dropdown (if available) or manually enter the model name required by your endpoint."

#: src/components/welcome-modal/model-selection-view.tsx:81
msgid "Select a transcribing model"
msgstr "Select a transcribing model"
Expand All @@ -928,8 +944,8 @@ msgid "Select Calendars"
msgstr "Select Calendars"

#: src/components/settings/components/ai/llm-view.tsx:253
msgid "Select or enter the model name required by your endpoint."
msgstr "Select or enter the model name required by your endpoint."
#~ msgid "Select or enter the model name required by your endpoint."
#~ msgstr "Select or enter the model name required by your endpoint."

#: src/components/settings/views/team.tsx:240
msgid "Send invite"
Expand Down Expand Up @@ -1076,7 +1092,7 @@ msgstr "Upcoming Events"
msgid "Upgrade"
msgstr "Upgrade"

#: src/components/settings/components/ai/llm-view.tsx:154
#: src/components/settings/components/ai/llm-view.tsx:155
msgid "Use the local Llama 3.2 model for enhanced privacy and offline capability."
msgstr "Use the local Llama 3.2 model for enhanced privacy and offline capability."

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/locales/en/messages.ts

Large diffs are not rendered by default.

44 changes: 30 additions & 14 deletions apps/desktop/src/locales/ko/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ msgstr ""
msgid "Anyone with the link can view this page"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:199
#: src/components/settings/components/ai/llm-view.tsx:200
msgid "API Base URL"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:225
#: src/components/settings/components/ai/llm-view.tsx:226
msgid "API Key"
msgstr ""

Expand Down Expand Up @@ -442,7 +442,7 @@ msgstr ""
msgid "Connect"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:179
#: src/components/settings/components/ai/llm-view.tsx:180
msgid "Connect to a self-hosted or third-party LLM endpoint (OpenAI API compatible)."
msgstr ""

Expand Down Expand Up @@ -488,7 +488,7 @@ msgstr ""
msgid "Current Plan"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:176
#: src/components/settings/components/ai/llm-view.tsx:177
msgid "Custom Endpoint"
msgstr ""

Expand Down Expand Up @@ -551,14 +551,26 @@ msgstr ""
msgid "Enter a section title"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:228
#: src/components/settings/components/ai/llm-view.tsx:291
msgid "Enter model name (e.g., gpt-4, llama3.2:3b)"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:229
msgid "Enter the API key for your custom LLM endpoint"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:202
msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"
#: src/components/settings/components/ai/llm-view.tsx:203
msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434)"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:203
#~ msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:11434/v1)"
#~ msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:203
#~ msgid "Enter the base URL for your custom LLM endpoint (e.g., http://localhost:8080/v1)"
#~ msgstr ""

#: src/components/settings/views/ai.tsx:498
#~ msgid "Enter the exact model name required by your endpoint (if applicable)."
#~ msgstr ""
Expand Down Expand Up @@ -681,7 +693,7 @@ msgstr ""
msgid "Live summary of the meeting"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:261
#: src/components/settings/components/ai/llm-view.tsx:263
msgid "Loading available models..."
msgstr ""

Expand Down Expand Up @@ -723,7 +735,7 @@ msgstr ""
msgid "Microphone Access"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:250
#: src/components/settings/components/ai/llm-view.tsx:251
msgid "Model Name"
msgstr ""

Expand Down Expand Up @@ -761,8 +773,8 @@ msgid "No members found"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:288
msgid "No models available for this endpoint."
msgstr ""
#~ msgid "No models available for this endpoint."
#~ msgstr ""

#: src/components/editor-area/note-header/chips/event-chip.tsx:302
msgid "No past events found."
Expand Down Expand Up @@ -919,6 +931,10 @@ msgstr ""
msgid "Sections"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:254
msgid "Select a model from the dropdown (if available) or manually enter the model name required by your endpoint."
msgstr ""

#: src/components/welcome-modal/model-selection-view.tsx:81
msgid "Select a transcribing model"
msgstr ""
Expand All @@ -928,8 +944,8 @@ msgid "Select Calendars"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:253
msgid "Select or enter the model name required by your endpoint."
msgstr ""
#~ msgid "Select or enter the model name required by your endpoint."
#~ msgstr ""

#: src/components/settings/views/team.tsx:240
msgid "Send invite"
Expand Down Expand Up @@ -1076,7 +1092,7 @@ msgstr ""
msgid "Upgrade"
msgstr ""

#: src/components/settings/components/ai/llm-view.tsx:154
#: src/components/settings/components/ai/llm-view.tsx:155
msgid "Use the local Llama 3.2 model for enhanced privacy and offline capability."
msgstr ""

Expand Down
Loading
Loading