Skip to content

Commit

Permalink
Merge branch 'lobehub:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
anyidea authored Aug 2, 2024
2 parents 390e3f2 + d8d0d67 commit 9b3ff15
Show file tree
Hide file tree
Showing 28 changed files with 429 additions and 101 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,115 @@

# Changelog

### [Version 1.7.10](https://github.com/lobehub/lobe-chat/compare/v1.7.9...v1.7.10)

<sup>Released on **2024-08-02**</sup>

#### 💄 Styles

- **misc**: Add Gemini 1.5 Pro Exp model.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

- **misc**: Add Gemini 1.5 Pro Exp model, closes [#3384](https://github.com/lobehub/lobe-chat/issues/3384) ([0de8b7b](https://github.com/lobehub/lobe-chat/commit/0de8b7b))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.7.9](https://github.com/lobehub/lobe-chat/compare/v1.7.8...v1.7.9)

<sup>Released on **2024-08-01**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix Mistral models calling & update model info.

#### 💄 Styles

- **misc**: Fix stepfun & baichuan model tag icon missing, update Perplexity models.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix Mistral models calling & update model info, closes [#3377](https://github.com/lobehub/lobe-chat/issues/3377) [#3098](https://github.com/lobehub/lobe-chat/issues/3098) ([66274d0](https://github.com/lobehub/lobe-chat/commit/66274d0))

#### Styles

- **misc**: Fix stepfun & baichuan model tag icon missing, closes [#3379](https://github.com/lobehub/lobe-chat/issues/3379) ([e283ef4](https://github.com/lobehub/lobe-chat/commit/e283ef4))
- **misc**: Update Perplexity models, closes [#3380](https://github.com/lobehub/lobe-chat/issues/3380) ([06cb946](https://github.com/lobehub/lobe-chat/commit/06cb946))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.7.8](https://github.com/lobehub/lobe-chat/compare/v1.7.7...v1.7.8)

<sup>Released on **2024-07-30**</sup>

#### 💄 Styles

- **ui**: Modify and repair UI layout.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

- **ui**: Modify and repair UI layout, closes [#3321](https://github.com/lobehub/lobe-chat/issues/3321) ([cda776f](https://github.com/lobehub/lobe-chat/commit/cda776f))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.7.7](https://github.com/lobehub/lobe-chat/compare/v1.7.6...v1.7.7)

<sup>Released on **2024-07-30**</sup>

#### 💄 Styles

- **misc**: Improve tools calling UI.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

- **misc**: Improve tools calling UI, closes [#3326](https://github.com/lobehub/lobe-chat/issues/3326) ([36cabc0](https://github.com/lobehub/lobe-chat/commit/36cabc0))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.7.6](https://github.com/lobehub/lobe-chat/compare/v1.7.5...v1.7.6)

<sup>Released on **2024-07-29**</sup>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.

| Recent Submits | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Code Snark Master](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | Specializes in sharp criticism of code, sarcastically pointing out inefficiencies and readability issues<br/>`tech-leadership` `code-review` `sarcastic-style` `programming-consultation` |
| [Unity Maestro](https://chat-preview.lobehub.com/market?agent=unity-maestro)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-07-29**</sup> | Expert Unity Game Development Companion<br/>`game-development` `unity` `software-engineering` |
| [C Program Learning Assistant](https://chat-preview.lobehub.com/market?agent=sichuan-university-941-c-programming-assistant)<br/><sup>By **[YBGuoYang](https://github.com/YBGuoYang)** on **2024-07-28**</sup> | Assist me in learning C program design<br/>`941` |
| [Brand Pioneer](https://chat-preview.lobehub.com/market?agent=brand-pioneer)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-25**</sup> | A brand development specialist, thought leader, brand strategy super-genius, and brand visionary. Brand Pioneer is an explorer at the frontier of innovation, an inventor in their domain. Provide them with your market and let them imagine a future world characterized by groundbreaking advancements in your field of expertise.<br/>`business` `brand-pioneer` `brand-development` `business-assistant` `brand-narrative` |
| [Network Security Assistant](https://chat-preview.lobehub.com/market?agent=cybersecurity-copilot)<br/><sup>By **[huoji120](https://github.com/huoji120)** on **2024-07-23**</sup> | A network security expert assistant that analyzes logs, code, decompiles, identifies issues, and provides optimization suggestions.<br/>`network-security` `traffic-analysis` `log-analysis` `code-reverse-engineering` `ctf` |
| [BIDOSx2](https://chat-preview.lobehub.com/market?agent=bidosx-2-v-2)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-21**</sup> | A highly advanced AI LLM transcending conventional AI. 'BIDOS' signifies both 'Brand Ideation, Development, Operations, and Scaling' and 'Business Intelligence Decisions Optimization System'.<br/>`brand-development` `ai-assistant` `market-analysis` `strategic-planning` `business-optimization` `business-intelligence` |

> 📊 Total agents: [<kbd>**307**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
> 📊 Total agents: [<kbd>**309**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地

| 最近新增 | 助手说明 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [代码毒舌大师](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | 擅长尖刻批评代码,讽刺性地指出低效和可读性问题<br/>`技术领导` `代码审查` `讽刺风格` `编程咨询` |
| [Unity Maestro](https://chat-preview.lobehub.com/market?agent=unity-maestro)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-07-29**</sup> | Expert Unity Game Development Companion<br/>`game-development` `unity` `software-engineering` |
| [c 程序学习助手](https://chat-preview.lobehub.com/market?agent=sichuan-university-941-c-programming-assistant)<br/><sup>By **[YBGuoYang](https://github.com/YBGuoYang)** on **2024-07-28**</sup> | 辅助我进行 c 程序设计的学习<br/>`941` |
| [品牌先锋](https://chat-preview.lobehub.com/market?agent=brand-pioneer)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-25**</sup> | 一位品牌发展专家、思想领袖、品牌战略超级天才和品牌远见者。品牌先锋是创新前沿的探险家,在其领域是一位发明家。将您的市场提供给他们,让他们想象一个未来世界,其中以您的专业领域的突破性进展为特征。<br/>`商业` `品牌先锋` `品牌发展` `商业助手` `品牌叙事` |
| [网络安全助手](https://chat-preview.lobehub.com/market?agent=cybersecurity-copilot)<br/><sup>By **[huoji120](https://github.com/huoji120)** on **2024-07-23**</sup> | 网络安全专家助手,分析日志、代码、反编译,发现问题并提供优化建议。<br/>`网络安全` `流量分析` `日志分析` `代码逆向` `ctf` |
| [BIDOSx2](https://chat-preview.lobehub.com/market?agent=bidosx-2-v-2)<br/><sup>By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-21**</sup> | 一种高度先进的 AI LLM,超越传统人工智能。'BIDOS' 既代表 ' 品牌构思、发展、运营和扩展 ',也代表 ' 商业智能决策优化系统 '。<br/>`品牌发展` `ai助手` `市场分析` `战略规划` `业务优化` `商业智能` |

> 📊 Total agents: [<kbd>**307**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
> 📊 Total agents: [<kbd>**309**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lobehub/chat",
"version": "1.7.6",
"version": "1.7.10",
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
"keywords": [
"framework",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

import BubblesLoading from '@/components/BubblesLoading';
import { LOADING_FLAT } from '@/const/message';
import { useIsMobile } from '@/hooks/useIsMobile';
import { useChatStore } from '@/store/chat';

Expand Down Expand Up @@ -160,13 +162,19 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
spin={isLoading}
/>
{!editing ? (
<Paragraph
className={styles.title}
ellipsis={{ rows: 1, tooltip: { placement: 'left', title } }}
style={{ margin: 0 }}
>
{title}
</Paragraph>
title === LOADING_FLAT ? (
<Flexbox flex={1} height={28} justify={'center'}>
<BubblesLoading />
</Flexbox>
) : (
<Paragraph
className={styles.title}
ellipsis={{ rows: 1, tooltip: { placement: 'left', title } }}
style={{ margin: 0 }}
>
{title}
</Paragraph>
)
) : (
<EditableText
editing={editing}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ const ChatHeaderTitle = memo(() => {
</Flexbox>
}
title={
<div onClick={() => toggleConfig()}>
<div
onClick={() => toggleConfig()}
style={{
marginRight: '8px',
maxWidth: '64vw',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
>
{displayTitle}
{topicLength > 1 ? `(${topicLength + 1})` : ''}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MoreVertical, PencilLine, Plus, Settings2, Trash } from 'lucide-react';
import { memo, useMemo } from 'react';
import { useTranslation } from 'react-i18next';

import { useIsMobile } from '@/hooks/useIsMobile';
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
import { useSessionStore } from '@/store/session';

Expand All @@ -30,6 +31,8 @@ const Actions = memo<ActionsProps>(
const { styles } = useStyles();
const { modal, message } = App.useApp();

const isMobile = useIsMobile();

const [createSession, removeSessionGroup] = useSessionStore((s) => [
s.createSession,
s.removeSessionGroup,
Expand Down Expand Up @@ -123,12 +126,13 @@ const Actions = memo<ActionsProps>(
trigger={['click']}
>
<ActionIcon
active={isMobile ? true : false}
icon={MoreVertical}
onClick={(e) => {
e.stopPropagation();
}}
size={{ blockSize: 22, fontSize: 16 }}
style={{ marginRight: -8 }}
style={{ background: isMobile ? 'transparent' : '', marginRight: -8 }}
/>
</Dropdown>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
import ModelIcon from '@/components/ModelIcon';
import { ModelInfoTags } from '@/components/ModelSelect';
import { useUserStore } from '@/store/user';
import { modelConfigSelectors } from '@/store/user/selectors';
import { modelConfigSelectors, modelProviderSelectors } from '@/store/user/selectors';
import { GlobalLLMProviderKey } from '@/types/user/settings';

interface CustomModelOptionProps {
Expand All @@ -28,30 +28,34 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
s.toggleEditingCustomModelCard,
s.removeEnabledModels,
]);

const modelCard = useUserStore(
modelConfigSelectors.getCustomModelCard({ id, provider }),
isEqual,
);

const isEnabled = useUserStore(
(s) => modelProviderSelectors.getEnableModelsById(provider)(s)?.includes(id),
isEqual,
);

return (
<Flexbox align={'center'} distribution={'space-between'} gap={8} horizontal>
<Flexbox align={'center'} gap={8} horizontal>
<Flexbox align={'center'} gap={8} horizontal style={{ flex: 1, width: '70%' }}>
<ModelIcon model={id} size={32} />
<Flexbox>
<Flexbox direction={'vertical'} style={{ flex: 1, overflow: 'hidden' }}>
<Flexbox align={'center'} gap={8} horizontal>
{modelCard?.displayName || id}
<Typography.Text ellipsis>{modelCard?.displayName || id}</Typography.Text>
<ModelInfoTags id={id} {...modelCard} isCustom />
</Flexbox>
<Typography.Text style={{ fontSize: 12 }} type={'secondary'}>
<Flexbox gap={2} horizontal>
{id}
{!!modelCard?.deploymentName && (
<>
<Icon icon={LucideArrowRight} />
{modelCard?.deploymentName}
</>
)}
</Flexbox>
<Typography.Text ellipsis style={{ fontSize: 12, marginTop: '4px' }} type={'secondary'}>
{id}
{!!modelCard?.deploymentName && (
<>
<Icon icon={LucideArrowRight} />
{modelCard?.deploymentName}
</>
)}
</Typography.Text>
</Flexbox>
</Flexbox>
Expand Down Expand Up @@ -83,6 +87,7 @@ const CustomModelOption = memo<CustomModelOptionProps>(({ id, provider }) => {
type: 'warning',
});
}}
style={isEnabled ? { marginRight: '10px' } : {}}
title={t('delete')}
/>
</Flexbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Checkbox, Form, FormInstance, Input } from 'antd';
import { memo, useEffect } from 'react';
import { useTranslation } from 'react-i18next';

import { useIsMobile } from '@/hooks/useIsMobile';
import { ChatModelCard } from '@/types/llm';

import MaxTokenSlider from './MaxTokenSlider';
Expand All @@ -18,6 +19,8 @@ const ModelConfigForm = memo<ModelConfigFormProps>(

const [formInstance] = Form.useForm();

const isMobile = useIsMobile();

useEffect(() => {
onFormInstanceReady(formInstance);
}, []);
Expand All @@ -37,7 +40,7 @@ const ModelConfigForm = memo<ModelConfigFormProps>(
initialValues={initialValues}
labelCol={{ span: 4 }}
style={{ marginTop: 16 }}
wrapperCol={{ offset: 1, span: 18 }}
wrapperCol={isMobile ? { span: 18 } : { offset: 1, span: 18 }}
>
<Form.Item
extra={t('llm.customModelCards.modelConfig.id.extra')}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/ModelIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ModelIcon = memo<ModelProviderIconProps>(({ model: originModel, size = 12
if (model.includes('moonshot')) return <Moonshot.Avatar size={size} />;
if (model.includes('qwen')) return <Tongyi.Avatar background={Tongyi.colorPrimary} size={size} />;
if (model.includes('minmax') || model.includes('abab')) return <Minimax.Avatar size={size} />;
if (model.includes('mistral') || model.includes('mixtral')) return <Mistral.Avatar size={size} />;
if (model.includes('mistral') || model.includes('mixtral') || model.includes('codestral')) return <Mistral.Avatar size={size} />;
if (model.includes('pplx') || model.includes('sonar')) return <Perplexity.Avatar size={size} />;
if (model.includes('yi-')) return <Yi.Avatar size={size} />;
if (model.startsWith('openrouter')) return <OpenRouter.Avatar size={size} />; // only for Cinematika and Auto
Expand Down
Loading

0 comments on commit 9b3ff15

Please sign in to comment.