Skip to content

Commit

Permalink
💄 style: Update Qwen
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Aug 28, 2024
1 parent d921037 commit a5f59ac
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 111 deletions.
6 changes: 3 additions & 3 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/ModelIcon/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import OpenAI from '@/OpenAI';
import OpenChat from '@/OpenChat';
import OpenRouter from '@/OpenRouter';
import Perplexity from '@/Perplexity';
import Qwen from '@/Qwen';
import Rwkv from '@/Rwkv';
import Spark from '@/Spark';
import Stability from '@/Stability';
import Stepfun from '@/Stepfun';
import Tongyi from '@/Tongyi';
import Wenxin from '@/Wenxin';
import Yi from '@/Yi';
import type { IconType } from '@/types';
Expand Down Expand Up @@ -71,7 +71,7 @@ export const modelMappings: ModelMapping[] = [
{ Icon: Gemini, keywords: ['gemini'] },
{ Icon: Gemma, keywords: ['gemma'] },
{ Icon: Moonshot, keywords: ['moonshot'] },
{ Icon: Tongyi, keywords: ['qwen'] },
{ Icon: Qwen, keywords: ['qwen'] },
{ Icon: Minimax, keywords: ['minmax', 'abab'] },
{ Icon: Mistral, keywords: ['mistral', 'mixtral', 'codestral', 'mathstral'] },
{ Icon: Perplexity, keywords: ['pplx', 'sonar'] },
Expand Down
4 changes: 2 additions & 2 deletions src/ProviderCombine/const.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import OpenAI from '@/OpenAI';
import OpenRouter from '@/OpenRouter';
import Perplexity from '@/Perplexity';
import { ModelProvider } from '@/ProviderIcon/const';
import Qwen from '@/Qwen';
import SiliconCloud from '@/SiliconCloud';
import Stepfun from '@/Stepfun';
import Together from '@/Together';
import Tongyi from '@/Tongyi';
import ZeroOne from '@/ZeroOne';
import Zhipu from '@/Zhipu';

Expand Down Expand Up @@ -126,7 +126,7 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: OpenRouter.Combine, keywords: [ModelProvider.OpenRouter], multiple: 0.8 },
{ Icon: ZeroOne.Combine, keywords: [ModelProvider.ZeroOne], multiple: 0.9 },
{ Icon: Together.Combine, keywords: [ModelProvider.TogetherAI] },
{ Icon: Tongyi.Combine, keywords: [ModelProvider.Qwen] },
{ Icon: Qwen.Combine, keywords: [ModelProvider.Qwen] },
{ Icon: Stepfun.Combine, keywords: [ModelProvider.Stepfun], multiple: 0.83 },
{ Icon: Baichuan.Combine, keywords: [ModelProvider.Baichuan], multiple: 0.83 },
{ Icon: AiMass.Combine, keywords: [ModelProvider.Taichu], multiple: 1.16 },
Expand Down
4 changes: 2 additions & 2 deletions src/ProviderIcon/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import Ollama from '@/Ollama';
import OpenAI from '@/OpenAI';
import OpenRouter from '@/OpenRouter';
import Perplexity from '@/Perplexity';
import Qwen from '@/Qwen';
import SiliconCloud from '@/SiliconCloud';
import Stepfun from '@/Stepfun';
import Together from '@/Together';
import Tongyi from '@/Tongyi';
import ZeroOne from '@/ZeroOne';
import Zhipu from '@/Zhipu';
import type { IconType } from '@/types';
Expand Down Expand Up @@ -91,7 +91,7 @@ export const providerMappings: ProviderMapping[] = [
{ Icon: OpenRouter, keywords: [ModelProvider.OpenRouter] },
{ Icon: ZeroOne, keywords: [ModelProvider.ZeroOne] },
{ Icon: Together, keywords: [ModelProvider.TogetherAI] },
{ Icon: Tongyi, keywords: [ModelProvider.Qwen] },
{ Icon: Qwen, keywords: [ModelProvider.Qwen] },
{ Icon: Stepfun, keywords: [ModelProvider.Stepfun] },
{ Icon: Baichuan, keywords: [ModelProvider.Baichuan] },
{ Icon: AiMass, keywords: [ModelProvider.Taichu] },
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions src/Qwen/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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, width: 'fit-content', ...style }}
viewBox="0 0 75 24"
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<title>{TITLE}</title>
<path d="M11.425 14.13h3.642l1.529 1.795a7.89 7.89 0 002.166-2.832 8.36 8.36 0 00.771-3.562c0-2.03-.624-3.664-1.874-4.905-1.24-1.25-2.884-1.874-4.931-1.874-1.028 0-1.99.186-2.885.558A6.99 6.99 0 007.45 4.932 8.576 8.576 0 005.656 7.67a8.354 8.354 0 00-.625 3.19c0 2.003.611 3.643 1.834 4.919 1.223 1.276 2.779 1.914 4.666 1.914.39 0 .793-.031 1.21-.093.425-.062.868-.16 1.329-.293l-2.645-3.177zM18.07 22l-2.127-2.46c-.753.293-1.48.51-2.18.652a9.84 9.84 0 01-2.073.226c-2.97 0-5.326-.85-7.072-2.552C2.873 16.164 2 13.865 2 10.966c0-1.577.28-3.052.837-4.426a10.148 10.148 0 012.406-3.576A10.427 10.427 0 018.713.758C10.025.253 11.429 0 12.927 0c2.915 0 5.25.86 7.005 2.579 1.755 1.72 2.632 4.01 2.632 6.872 0 1.764-.354 3.399-1.063 4.905a10.156 10.156 0 01-3.031 3.776L21.714 22H18.07zm5.743-14.675h2.884l2.047 6.433.054.16c.248.789.38 1.373.399 1.755.097-.302.221-.62.372-.958.16-.345.354-.713.585-1.103l4.227-7.218 2.06 7.43c.08.275.146.559.2.851.053.293.097.63.133 1.01.132-.372.265-.708.398-1.01.142-.3.28-.562.412-.784l3.816-6.567h3.243L36.097 20.71l-2.127-7.045a8.683 8.683 0 01-.213-.798 17.846 17.846 0 01-.146-.97 69.17 69.17 0 01-.519 1.063c-.15.302-.265.514-.345.638l-4.28 7.112-4.653-13.385zm24.392 4.785h6.5c-.026-.85-.292-1.52-.797-2.007-.496-.497-1.166-.745-2.008-.745-.957 0-1.768.248-2.432.745-.665.496-1.086 1.165-1.263 2.007zm6.34 3.948l2.061 1.608c-.735.966-1.533 1.67-2.392 2.114-.86.443-1.848.665-2.965.665-1.87 0-3.38-.563-4.533-1.689-1.152-1.134-1.728-2.623-1.728-4.466 0-2.162.66-3.935 1.98-5.317 1.33-1.391 3.018-2.087 5.066-2.087 1.71 0 3.07.532 4.08 1.595 1.02 1.055 1.53 2.473 1.53 4.254 0 .15-.01.345-.027.585-.01.23-.027.51-.054.837h-9.61c0 1.143.288 2.056.864 2.738.576.674 1.342 1.01 2.3 1.01.664 0 1.293-.159 1.887-.478a4.633 4.633 0 001.542-1.369zm14.317 3.868l.957-7.244c.018-.133.031-.27.04-.412.009-.151.013-.368.013-.652 0-.824-.2-1.453-.598-1.887-.399-.444-.98-.665-1.741-.665-1.188 0-2.118.385-2.792 1.156-.673.763-1.112 1.937-1.316 3.523l-.797 6.181H59.77l1.661-12.601h2.752l-.213 1.515c.727-.664 1.476-1.156 2.247-1.475a6.5 6.5 0 012.486-.479c1.293 0 2.3.341 3.017 1.024.727.673 1.09 1.622 1.09 2.845 0 .31-.018.673-.053 1.09-.036.407-.089.886-.16 1.435l-.877 6.647h-2.858z"></path>
</svg>
);
});

export default Icon;
74 changes: 74 additions & 0 deletions src/Qwen/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
nav: Components
group: Model
title: Qwen (千问)
atomId: Qwen
description: https://huggingface.co/Qwen
---

## Icons

```tsx
import { Qwen } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Qwen size={64} />
<Qwen.Color size={64} />
</Flexbox>
);
```

## Text

```tsx
import { Qwen } from '@lobehub/icons';

export default () => <Qwen.Text size={48} />;
```

## Combine

```tsx
import { Qwen } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16}>
<Qwen.Combine size={64} />
<Qwen.Combine size={64} type={'color'} />
</Flexbox>
);
```

## Avatars

```tsx
import { Qwen } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} horizontal>
<Qwen.Avatar size={64} background={Qwen.colorGradient} />
<Qwen.Avatar size={64} />
<Qwen.Avatar size={64} shape={'square'} />
</Flexbox>
);
```

## Colors

```tsx
import { Qwen } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

import ColorPreview from '../components/ColorPreview';

export default () => (
<Flexbox gap={16} horizontal>
<ColorPreview color={Qwen.colorPrimary} />
<ColorPreview color={Qwen.colorGradient} />
</Flexbox>
);
```
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Tongyi/style.ts → src/Qwen/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const TITLE = 'Tongyi';
export const TEXT_MULTIPLE = 0.75;
export const TEXT_MULTIPLE = 0.7;
export const SPACE_MULTIPLE = 0.2;
export const COLOR_PRIMARY = '#615ced';
export const COLOR_GRADIENT = 'linear-gradient(to right, #00055F, #6F69F7)';
25 changes: 0 additions & 25 deletions src/Tongyi/components/Text.tsx

This file was deleted.

75 changes: 0 additions & 75 deletions src/Tongyi/index.md

This file was deleted.

3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export { default as ProviderCombine, type ProviderCombineProps } from './Provide
export { default as ProviderIcon, type ProviderIconProps } from './ProviderIcon';
export { ModelProvider, type ModelProviderKey, providerMappings } from './ProviderIcon/const';
export { default as Qingyan, type CompoundedIcon as QingyanProps } from './Qingyan';
export { default as Qwen, type CompoundedIcon as QwenProps } from './Qwen';
export { default as Tongyi, type CompoundedIcon as TongyiProps } from './Qwen';
export { default as Replicate, type CompoundedIcon as ReplicateProps } from './Replicate';
export { default as Rwkv, type CompoundedIcon as RwkvProps } from './Rwkv';
export { default as SiliconCloud, type CompoundedIcon as SiliconCloudProps } from './SiliconCloud';
Expand All @@ -77,7 +79,6 @@ export { default as Stepfun, type CompoundedIcon as StepfunProps } from './Stepf
export { default as Suno, type CompoundedIcon as SunoProps } from './Suno';
export { default as Tencent, type CompoundedIcon as TencentProps } from './Tencent';
export { default as Together, type CompoundedIcon as TogetherProps } from './Together';
export { default as Tongyi, type CompoundedIcon as TongyiProps } from './Tongyi';
export type { IconType } from './types';
export { default as Vllm, type CompoundedIcon as VllmProps } from './Vllm';
export { default as Wenxin, type CompoundedIcon as WenxinProps } from './Wenxin';
Expand Down

0 comments on commit a5f59ac

Please sign in to comment.