mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
No commits in common. "cf8ee499f90b2ea0cd2c873341a41c664244c03f" and "1c2bd5d419fe9b43963a9b0aef6aace08eca763e" have entirely different histories.
cf8ee499f9
...
1c2bd5d419
@ -21,10 +21,6 @@ class OpenAIClient(GenAIClient):
|
|||||||
|
|
||||||
def _init_provider(self):
|
def _init_provider(self):
|
||||||
"""Initialize the client."""
|
"""Initialize the client."""
|
||||||
if self.genai_config.base_url:
|
|
||||||
return OpenAI(
|
|
||||||
api_key=self.genai_config.api_key, base_url=self.genai_config.base_url
|
|
||||||
)
|
|
||||||
return OpenAI(api_key=self.genai_config.api_key)
|
return OpenAI(api_key=self.genai_config.api_key)
|
||||||
|
|
||||||
def _send(self, prompt: str, images: list[bytes]) -> Optional[str]:
|
def _send(self, prompt: str, images: list[bytes]) -> Optional[str]:
|
||||||
|
|||||||
@ -127,7 +127,9 @@ export default function SearchThumbnail({
|
|||||||
.filter(
|
.filter(
|
||||||
(item) => item !== undefined && !item.includes("-verified"),
|
(item) => item !== undefined && !item.includes("-verified"),
|
||||||
)
|
)
|
||||||
.map((text) => t(text, { ns: "objects" }))
|
.map((text) =>
|
||||||
|
t(text.replace(" ", "_").toLowerCase(), { ns: "objects" }),
|
||||||
|
)
|
||||||
.sort()
|
.sort()
|
||||||
.join(", ")
|
.join(", ")
|
||||||
.replaceAll("-verified", "")}
|
.replaceAll("-verified", "")}
|
||||||
|
|||||||
@ -248,7 +248,7 @@ function GeneralFilterButton({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (selectedLabels.length == 1) {
|
if (selectedLabels.length == 1) {
|
||||||
return t(selectedLabels[0], {
|
return t(selectedLabels[0].replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ export function GeneralFilterContent({
|
|||||||
{allLabels.map((item) => (
|
{allLabels.map((item) => (
|
||||||
<FilterSwitch
|
<FilterSwitch
|
||||||
key={item}
|
key={item}
|
||||||
label={t(item, { ns: "objects" })}
|
label={t(item.replace(" ", "_").toLowerCase(), { ns: "objects" })}
|
||||||
isChecked={currentLabels?.includes(item) ?? false}
|
isChecked={currentLabels?.includes(item) ?? false}
|
||||||
onCheckedChange={(isChecked) => {
|
onCheckedChange={(isChecked) => {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
|
|||||||
@ -419,7 +419,7 @@ export default function InputWithTags({
|
|||||||
? t("button.yes", { ns: "common" })
|
? t("button.yes", { ns: "common" })
|
||||||
: t("button.no", { ns: "common" });
|
: t("button.no", { ns: "common" });
|
||||||
} else if (filterType === "labels") {
|
} else if (filterType === "labels") {
|
||||||
return t(filterValues as string, {
|
return t((filterValues as string).replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
});
|
});
|
||||||
} else if (filterType === "search_type") {
|
} else if (filterType === "search_type") {
|
||||||
@ -809,7 +809,7 @@ export default function InputWithTags({
|
|||||||
>
|
>
|
||||||
{t("filter.label." + filterType)}:{" "}
|
{t("filter.label." + filterType)}:{" "}
|
||||||
{filterType === "labels"
|
{filterType === "labels"
|
||||||
? t(value, {
|
? t(value.replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
})
|
})
|
||||||
: value.replaceAll("_", " ")}
|
: value.replaceAll("_", " ")}
|
||||||
|
|||||||
@ -325,7 +325,7 @@ export default function ReviewDetailDialog({
|
|||||||
values={{
|
values={{
|
||||||
objects: missingObjects
|
objects: missingObjects
|
||||||
.map((x) =>
|
.map((x) =>
|
||||||
t(x, {
|
t(x.replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -690,7 +690,7 @@ function ObjectDetailsTab({
|
|||||||
<div className="text-sm text-primary/40">{t("details.label")}</div>
|
<div className="text-sm text-primary/40">{t("details.label")}</div>
|
||||||
<div className="flex flex-row items-center gap-2 text-sm capitalize">
|
<div className="flex flex-row items-center gap-2 text-sm capitalize">
|
||||||
{getIconForLabel(search.label, "size-4 text-primary")}
|
{getIconForLabel(search.label, "size-4 text-primary")}
|
||||||
{t(search.label, {
|
{t(search.label.replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
})}
|
})}
|
||||||
{search.sub_label && ` (${search.sub_label})`}
|
{search.sub_label && ` (${search.sub_label})`}
|
||||||
@ -953,7 +953,7 @@ function ObjectDetailsTab({
|
|||||||
description={
|
description={
|
||||||
search.label
|
search.label
|
||||||
? t("details.editSubLabel.desc", {
|
? t("details.editSubLabel.desc", {
|
||||||
label: t(search.label, {
|
label: t(search.label.replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
@ -970,7 +970,7 @@ function ObjectDetailsTab({
|
|||||||
description={
|
description={
|
||||||
search.label
|
search.label
|
||||||
? t("details.editLPR.desc", {
|
? t("details.editLPR.desc", {
|
||||||
label: t(search.label, {
|
label: t(search.label.replace(" ", "_").toLowerCase(), {
|
||||||
ns: "objects",
|
ns: "objects",
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@ -448,7 +448,7 @@ export function ZoneObjectSelector({ camera }: ZoneObjectSelectorProps) {
|
|||||||
<SelectSeparator className="bg-secondary" />
|
<SelectSeparator className="bg-secondary" />
|
||||||
{allLabels.map((item) => (
|
{allLabels.map((item) => (
|
||||||
<SelectItem key={item} value={item}>
|
<SelectItem key={item} value={item}>
|
||||||
{t(item, { ns: "objects" })}
|
{t(item.replace(" ", "_").toLowerCase(), { ns: "objects" })}
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
</SelectGroup>
|
</SelectGroup>
|
||||||
|
|||||||
@ -936,7 +936,7 @@ export function ZoneObjectSelector({
|
|||||||
className="w-full cursor-pointer capitalize text-primary"
|
className="w-full cursor-pointer capitalize text-primary"
|
||||||
htmlFor={item}
|
htmlFor={item}
|
||||||
>
|
>
|
||||||
{t(item, { ns: "objects" })}
|
{t(item.replace(" ", "_").toLowerCase(), { ns: "objects" })}
|
||||||
</Label>
|
</Label>
|
||||||
<Switch
|
<Switch
|
||||||
key={item}
|
key={item}
|
||||||
|
|||||||
@ -152,7 +152,7 @@ function ThumbnailRow({
|
|||||||
return (
|
return (
|
||||||
<div className="rounded-lg bg-background_alt p-2 md:px-4">
|
<div className="rounded-lg bg-background_alt p-2 md:px-4">
|
||||||
<div className="flex flex-row items-center text-lg capitalize">
|
<div className="flex flex-row items-center text-lg capitalize">
|
||||||
{t(objectType, { ns: "objects" })}
|
{t(objectType.replace(" ", "_").toLowerCase(), { ns: "objects" })}
|
||||||
{searchResults && (
|
{searchResults && (
|
||||||
<span className="ml-3 text-sm text-secondary-foreground">
|
<span className="ml-3 text-sm text-secondary-foreground">
|
||||||
{t("trackedObjectsCount", {
|
{t("trackedObjectsCount", {
|
||||||
|
|||||||
@ -79,7 +79,9 @@ export default function CameraSettingsView({
|
|||||||
const alertsLabels = useMemo(() => {
|
const alertsLabels = useMemo(() => {
|
||||||
return cameraConfig?.review.alerts.labels
|
return cameraConfig?.review.alerts.labels
|
||||||
? cameraConfig.review.alerts.labels
|
? cameraConfig.review.alerts.labels
|
||||||
.map((label) => t(label, { ns: "objects" }))
|
.map((label) =>
|
||||||
|
t(label.replace(" ", "_").toLowerCase(), { ns: "objects" }),
|
||||||
|
)
|
||||||
.join(", ")
|
.join(", ")
|
||||||
: "";
|
: "";
|
||||||
}, [cameraConfig, t]);
|
}, [cameraConfig, t]);
|
||||||
@ -87,7 +89,9 @@ export default function CameraSettingsView({
|
|||||||
const detectionsLabels = useMemo(() => {
|
const detectionsLabels = useMemo(() => {
|
||||||
return cameraConfig?.review.detections.labels
|
return cameraConfig?.review.detections.labels
|
||||||
? cameraConfig.review.detections.labels
|
? cameraConfig.review.detections.labels
|
||||||
.map((label) => t(label, { ns: "objects" }))
|
.map((label) =>
|
||||||
|
t(label.replace(" ", "_").toLowerCase(), { ns: "objects" }),
|
||||||
|
)
|
||||||
.join(", ")
|
.join(", ")
|
||||||
: "";
|
: "";
|
||||||
}, [cameraConfig, t]);
|
}, [cameraConfig, t]);
|
||||||
|
|||||||
@ -326,9 +326,7 @@ export default function ClassificationSettingsView({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="w-20">
|
<SelectTrigger className="w-20">
|
||||||
{t(
|
{classificationSettings.search.model_size}
|
||||||
`classification.semanticSearch.modelSize.${classificationSettings.search.model_size}.title`,
|
|
||||||
)}
|
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
@ -458,9 +456,7 @@ export default function ClassificationSettingsView({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<SelectTrigger className="w-20">
|
<SelectTrigger className="w-20">
|
||||||
{t(
|
{classificationSettings.face.model_size}
|
||||||
`classification.faceRecognition.modelSize.${classificationSettings.face.model_size}.title`,
|
|
||||||
)}
|
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user