Skip to content

Commit

Permalink
✨ feat: Add LM Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed May 15, 2024
1 parent 97b7383 commit 431c63f
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Contributions, corrections & requests can be made on GitHub.

<!-- ICON LIST -->

| Model | Provider | Application |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ✅ [Ai21Labs (Jamba)](https://icons.lobehub.com/components/ai-21)<br/>✅ [Baichuan (百川)](https://icons.lobehub.com/components/baichuan)<br/>✅ [Claude](https://icons.lobehub.com/components/claude)<br/>✅ [Databricks (DBRX)](https://icons.lobehub.com/components/dbrx)<br/>✅ [DeepSeek](https://icons.lobehub.com/components/deep-seek)<br/>✅ [FishAudio (Bert)](https://icons.lobehub.com/components/fish-audio)<br/>✅ [Google (Gemini)](https://icons.lobehub.com/components/gemini)<br/>✅ [Google (Gemma)](https://icons.lobehub.com/components/gemma)<br/>✅ [Grok](https://icons.lobehub.com/components/grok)<br/>✅ [Hunyuan (腾讯混元)](https://icons.lobehub.com/components/hunyuan)<br/>✅ [LLaVA](https://icons.lobehub.com/components/l-la-va)<br/>✅ [Minimax](https://icons.lobehub.com/components/minimax)<br/>✅ [Mistral](https://icons.lobehub.com/components/mistral)<br/>✅ [OpenAI (DALL·E)](https://icons.lobehub.com/components/dalle)<br/>✅ [OpenChat](https://icons.lobehub.com/components/open-chat)<br/>✅ [RWKV](https://icons.lobehub.com/components/rwkv)<br/>✅ [Spark (讯飞星火)](https://icons.lobehub.com/components/spark)<br/>✅ [Tongyi (通义)](https://icons.lobehub.com/components/tongyi)<br/>✅ [Wenxin (文心)](https://icons.lobehub.com/components/wenxin)<br/>✅ [Yi (零一万物)](https://icons.lobehub.com/components/yi)<br/>✅ [Zhipu (ChatGLM)](https://icons.lobehub.com/components/chat-glm) | ✅ [01.AI (零一万物)](https://icons.lobehub.com/components/zero-one)<br/>✅ [Alibaba](https://icons.lobehub.com/components/alibaba)<br/>✅ [AntGroup](https://icons.lobehub.com/components/ant-group)<br/>✅ [Anthropic](https://icons.lobehub.com/components/anthropic)<br/>✅ [AWS](https://icons.lobehub.com/components/aws)<br/>✅ [AWS (Bedrock)](https://icons.lobehub.com/components/bedrock)<br/>✅ [Baidu](https://icons.lobehub.com/components/baidu)<br/>✅ [ByteDance](https://icons.lobehub.com/components/byte-dance)<br/>✅ [Cloudflare](https://icons.lobehub.com/components/cloudflare)<br/>✅ [Cloudflare (WorkersAI)](https://icons.lobehub.com/components/workers-ai)<br/>✅ [Cohere (Command)](https://icons.lobehub.com/components/cohere)<br/>✅ [Fireworks](https://icons.lobehub.com/components/fireworks)<br/>✅ [Google](https://icons.lobehub.com/components/google)<br/>✅ [Google(DeepMind)](https://icons.lobehub.com/components/deep-mind)<br/>✅ [Groq](https://icons.lobehub.com/components/groq)<br/>✅ [HuggingFace](https://icons.lobehub.com/components/hugging-face)<br/>✅ [Meta](https://icons.lobehub.com/components/meta)<br/>✅ [Microsoft (Azure)](https://icons.lobehub.com/components/azure)<br/>✅ [Moonshot (月之暗面)](https://icons.lobehub.com/components/moonshot)<br/>✅ [Ollama](https://icons.lobehub.com/components/ollama)<br/>✅ [OpenAI (ChatGPT)](https://icons.lobehub.com/components/open-ai)<br/>✅ [OpenRouter](https://icons.lobehub.com/components/open-router)<br/>✅ [Perplexity](https://icons.lobehub.com/components/perplexity)<br/>✅ [Replicate](https://icons.lobehub.com/components/replicate)<br/>✅ [Stability (StableDiffusion)](https://icons.lobehub.com/components/stability)<br/>✅ [Tencent](https://icons.lobehub.com/components/tencent)<br/>✅ [together.ai](https://icons.lobehub.com/components/together)<br/>✅ [Zeabur](https://icons.lobehub.com/components/zeabur)<br/>✅ [Zhipu (智谱)](https://icons.lobehub.com/components/zhipu) | ✅ [Adobe](https://icons.lobehub.com/components/adobe)<br/>✅ [Adobe (Firefly)](https://icons.lobehub.com/components/adobe-firefly)<br/>✅ [Automatic1111 (SD Webui)](https://icons.lobehub.com/components/automatic)<br/>✅ [Github](https://icons.lobehub.com/components/github)<br/>✅ [Github Copilot](https://icons.lobehub.com/components/github-copilot)<br/>✅ [Google (Colab)](https://icons.lobehub.com/components/colab)<br/>✅ [Langfuse](https://icons.lobehub.com/components/langfuse)<br/>✅ [Microsoft Copilot](https://icons.lobehub.com/components/copilot)<br/>✅ [Midjourney](https://icons.lobehub.com/components/midjourney)<br/>✅ [Nvidia (ChatWithRTX)](https://icons.lobehub.com/components/nvidia)<br/>✅ [Pollinations](https://icons.lobehub.com/components/pollinations)<br/>✅ [Qingyan (智谱清言)](https://icons.lobehub.com/components/qingyan)<br/>✅ [Suno](https://icons.lobehub.com/components/suno) |
| Model | Provider | Application |
| ----- | -------- | ----------- |
| | | |

<!-- ICON LIST -->

Expand Down
22 changes: 22 additions & 0 deletions src/LmStudio/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { memo } from 'react';

import IconAvatar, { type IconAvatarProps } from '@/IconAvatar';

import { COLOR_GRADIENT, TITLE } from '../style';
import Mono from './Mono';

export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;

const Avatar = memo<AvatarProps>(({ background, ...rest }) => {
return (
<IconAvatar
Icon={Mono}
aria-label={TITLE}
background={background || COLOR_GRADIENT}
color={'#fff'}
{...rest}
/>
);
});

export default Avatar;
29 changes: 29 additions & 0 deletions src/LmStudio/components/Combine.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { memo } from 'react';

import IconCombine, { type IconCombineProps } from '@/IconCombine';

import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
import Avatar from './Avatar';
import Mono from './Mono';
import Text from './Text';

export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
type?: 'color' | 'mono';
}
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
const Icon = type === 'color' ? Avatar : Mono;

return (
<IconCombine
Icon={Icon}
Text={Text}
aria-label={TITLE}
iconProps={type === 'color' ? { shape: 'square' } : {}}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});

export default Combine;
30 changes: 30 additions & 0 deletions src/LmStudio/components/Mono.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { forwardRef } from 'react';

import type { IconType } from '@/types';

import { TITLE } from '../style';

const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
return (
<svg
fill="currentColor"
fillRule="evenodd"
height={size}
ref={ref}
style={{ flex: 'none', lineHeight: 1, ...style }}
viewBox="0 0 24 24"
width={size}
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path
d="M2.84 2a1.273 1.273 0 100 2.547h14.107a1.273 1.273 0 100-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H22.04a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h14.106a1.274 1.274 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H15.38a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h14.106a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h9.698a1.273 1.273 0 100-2.547h-9.698z"
fillOpacity=".3"
></path>
<path d="M2.84 2a1.273 1.273 0 100 2.547h10.287a1.274 1.274 0 000-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H18.22a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H11.56a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h5.78a1.273 1.273 0 100-2.547h-5.78z"></path>
</svg>
);
});

export default Icon;
Loading

0 comments on commit 431c63f

Please sign in to comment.