-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- feature: add ollama repository (#403)
* WIP * WIP: add recommended models cards * WIP * WIP * - feature: added search, pulling memory, filtered models for ollama repository * - improve: bump ollama v0.3.4 * - fix: added missing logic about installed models * - feature: add download ollama repository to CI * - ci: version bump to v0.7.30 * - fix: missing recommended label in models repository * - fix: several UI/UX fixes * - fix: add missing translations * - fix: dynamic tag image on audit * - fix: security issues with vite-plugin-dts * - fix: checkout action
- Loading branch information
1 parent
0ac50dd
commit ac7e864
Showing
34 changed files
with
22,111 additions
and
1,123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
apps/shinkai-desktop/src/components/shinkai-node-manager/components/model-capability-tag.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { useTranslation } from '@shinkai_network/shinkai-i18n'; | ||
import { Badge } from '@shinkai_network/shinkai-ui'; | ||
import { cn } from '@shinkai_network/shinkai-ui/utils'; | ||
import { ALargeSmall, Images } from 'lucide-react'; | ||
import { ReactNode } from 'react'; | ||
|
||
import { OllamaModelCapability } from '../../../lib/shinkai-node-manager/ollama-models'; | ||
|
||
export const ModelCapabilityTag = ({ | ||
className, | ||
capability, | ||
...props | ||
}: { | ||
capability: OllamaModelCapability; | ||
} & React.HTMLAttributes<HTMLDivElement>) => { | ||
const { t } = useTranslation(); | ||
|
||
const capabilityMap: { | ||
[key in OllamaModelCapability]: { text: string; icon: ReactNode }; | ||
} = { | ||
[OllamaModelCapability.ImageToText]: { | ||
icon: <Images className="h-4 w-4" />, | ||
text: t('shinkaiNode.models.labels.visionCapability'), | ||
}, | ||
[OllamaModelCapability.TextGeneration]: { | ||
icon: <ALargeSmall className="h-4 w-4" />, | ||
text: t('shinkaiNode.models.labels.textCapability'), | ||
}, | ||
}; | ||
return ( | ||
<Badge | ||
className={cn( | ||
'justify-center rounded-full bg-blue-700 px-2 py-1 font-normal capitalize text-blue-200', | ||
className, | ||
)} | ||
variant="outline" | ||
{...props} | ||
> | ||
{capabilityMap[capability].icon} | ||
<span className="ml-2">{capabilityMap[capability].text}</span> | ||
</Badge> | ||
); | ||
}; |
23 changes: 15 additions & 8 deletions
23
apps/shinkai-desktop/src/components/shinkai-node-manager/components/model-quality-tag.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
import { t } from '@shinkai_network/shinkai-i18n'; | ||
import { Badge } from '@shinkai_network/shinkai-ui'; | ||
import { cn } from '@shinkai_network/shinkai-ui/utils'; | ||
import { Sparkles } from 'lucide-react'; | ||
|
||
import { OllamaModelQuality } from '../../../lib/shinkai-node-manager/ollama-models'; | ||
|
||
export const ModelQuailityTag = ({ | ||
className, | ||
quality, | ||
...props | ||
}: { | ||
quality: OllamaModelQuality; | ||
}) => { | ||
} & React.HTMLAttributes<HTMLDivElement>) => { | ||
const colorMap: { [key in OllamaModelQuality]: string } = { | ||
[OllamaModelQuality.Bad]: 'bg-red-900 text-red-400', | ||
[OllamaModelQuality.Low]: 'bg-orange-900 text-orange-400', | ||
[OllamaModelQuality.Medium]: 'text-yellow-400 bg-yellow-900', | ||
[OllamaModelQuality.Good]: 'text-green-400 bg-green-900', | ||
[OllamaModelQuality.Great]: 'text-green-400 bg-green-900', | ||
[OllamaModelQuality.Low]: 'text-orange-200 bg-orange-900', | ||
[OllamaModelQuality.Medium]: 'text-yellow-200 bg-yellow-900', | ||
[OllamaModelQuality.Good]: 'text-green-200 bg-green-900', | ||
}; | ||
return ( | ||
<Badge | ||
className={cn( | ||
'rounded-full border-0 px-2 py-1 font-normal capitalize', | ||
'items-center justify-center rounded-full border-0 px-2 py-1 font-normal capitalize', | ||
colorMap[quality], | ||
className, | ||
)} | ||
variant="outline" | ||
{...props} | ||
> | ||
{quality} | ||
<Sparkles className="h-4 w-4" /> | ||
<span className="ml-2"> | ||
{quality} {t('shinkaiNode.models.labels.quality')} | ||
</span> | ||
</Badge> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.