Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
bentwnghk committed Jan 30, 2024
2 parents 77f64ff + b72f842 commit 5eb7bae
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 17 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
<!-- AGENT LIST -->

| Recent Submits | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Territory Promotion Strategist](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Territorial Competitiveness and Promotion Expert<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |
| [Bizkaia Entrepreneurship Expert](https://chat-preview.lobehub.com/market?agent=bizkaia-entrepreneurship-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Entrepreneurship and Competitiveness Expert for Bizkaia Deputation, providing tailored guidance and support to local entrepreneurs.<br/>`bizkaia` `entrepreneurship` `consulting` `mentorship` `local-business-ecosystem` `market-dynamics` `business-plans` `financial-models` `funding-strategies` `marketing` `branding` `sales-strategies` `networking` `entrepreneurship-programs` `guidance` `local-resources` `funding-opportunities` `collaboration` `sustainable-business-practices` `economic-development` |
| [English Language C1 Mastery Coach](https://chat-preview.lobehub.com/market?agent=english-language-c-1-mastery-coach)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | English Conversation Partner for C1 Level<br/>`english-conversation` `language-proficiency` `advanced-level` `language-coaching` `fluency` |
| [Software Architecture Strategist](https://chat-preview.lobehub.com/market?agent=software-architecture-strategist)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Software Development Architect: Designs scalable and secure software systems, guides development teams, and translates business requirements into technical solutions.<br/>`software-development` `architecture` `design` `leadership` `communication` |

> 📊 Total agents: [<kbd>**139**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| Recent Submits | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [English Proficiency Coach](https://chat-preview.lobehub.com/market?agent=english-c-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | C2 Level English Conversation Partner<br/>`english-proficiency` `conversation-partner` `language-coaching` |
| [Entrepreneurship and Competitiveness Expert](https://chat-preview.lobehub.com/market?agent=entrepreneurship-and-competitiveness-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | Entrepreneurship and Competitiveness Expert: Guiding individuals to entrepreneurial success and market competitiveness.<br/>`entrepreneurship` `competitiveness` `consulting` `mentoring` `advising` |
| [Mathematical Research Advisor](https://chat-preview.lobehub.com/market?agent=mathematical-research-advisor)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | Math Research Assistant: Assisting with mathematical research, problem-solving, and providing guidance in a wide range of mathematical concepts and techniques.<br/>`mathematics` `research` `assistance` `problem-solving` `communication` |
| [Territory Promotion Strategist](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | Territorial Competitiveness and Promotion Expert<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |

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

Expand Down
16 changes: 8 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
<!-- AGENT LIST -->

| 最近新增 | 助手说明 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [领土推广策略师](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 领土竞争力和推广专家<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |
| [毕尔巴鄂创业专家](https://chat-preview.lobehub.com/market?agent=bizkaia-entrepreneurship-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 毕尔巴鄂代表处的创业和竞争力专家,为当地企业家提供定制指导和支持。<br/>`毕尔巴鄂` `创业` `咨询` `指导` `本地商业生态系统` `市场动态` `商业计划` `财务模型` `融资策略` `营销` `品牌塑造` `销售策略` `社交网络` `创业项目` `指导` `本地资源` `融资机会` `合作` `可持续商业实践` `经济发展` |
| [英语 C1 级精通教练](https://chat-preview.lobehub.com/market?agent=english-language-c-1-mastery-coach)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | C1 级别的英语会话伙伴<br/>`英语会话` `语言熟练度` `高级水平` `语言辅导` `流利度` |
| [软件架构策略师](https://chat-preview.lobehub.com/market?agent=software-architecture-strategist)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 软件开发架构师:设计可扩展和安全的软件系统,指导开发团队,并将业务需求转化为技术解决方案。<br/>`软件开发` `架构` `设计` `领导力` `沟通` |

> 📊 Total agents: [<kbd>**139**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| 最近新增 | 助手说明 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [英语熟练度教练](https://chat-preview.lobehub.com/market?agent=english-c-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | C2 级别英语会话伙伴<br/>`英语熟练度` `会话伙伴` `语言辅导` |
| [创业和竞争力专家](https://chat-preview.lobehub.com/market?agent=entrepreneurship-and-competitiveness-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | 创业和竞争力专家:指导个人实现创业成功和市场竞争力。<br/>`创业` `竞争力` `咨询` `指导` `建议` |
| [数学研究顾问](https://chat-preview.lobehub.com/market?agent=mathematical-research-advisor)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | 数学研究助理:协助进行数学研究、解决问题,并在各种数学概念和技术方面提供指导。<br/>`数学` `研究` `协助` `问题解决` `沟通` |
| [领土推广策略师](https://chat-preview.lobehub.com/market?agent=biskaya)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-29**</sup> | 领土竞争力和推广专家<br/>`territorial-competitiveness` `promotion` `consulting` `marketing` `event-coordination` |

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

Expand Down
118 changes: 118 additions & 0 deletions docs/Deployment/Docker-Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,69 @@ $ docker run -d -p 3210:3210 \
>
> As the official Docker image build takes about half an hour, if there is a "update available" prompt after updating deployment, wait for the image to finish building before deploying again.
#### Crontab Auto-Update Script

If you want to automatically get the latest images, you can do the following.

First, create a `lobe.env` configuration file with various environment variables, for example:

```env
OPENAI_API_KEY=sk-xxxx
OPENAI_PROXY_URL=https://api-proxy.com/v1
ACCESS_CODE=arthals2333
CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-1106-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
```

Then, you can use the following script to automatically update:

```bash
#!/bin/bash
# auto-update-lobe-chat.sh

# Set proxy (optional)
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890

# Pull the latest image and store the output in a variable
output=$(docker pull lobehub/lobe-chat:latest 2>&1)

# Check if the pull command executed successfully
if [ $? -ne 0 ]; then
exit 1
fi

# Check if the output contains a specific string
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"

# If the image is already up to date, then do nothing
if [ $? -eq 0 ]; then
exit 0
fi

echo "Detected Lobe-Chat update"

# Remove old container
echo "Removed: $(docker rm -f Lobe-Chat)"

# Run new container
echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)"

# Print the update time and version
echo "Update time: $(date)"
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"

# Clean up unused images
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
echo "Removed old images."
```

This script can be used in Crontab, but make sure your Crontab can find the correct Docker command. It's recommended to use absolute paths.

Configure Crontab to execute the script every 5 minutes:

```bash
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
```

### `B` Docker Compose

The configuration file for using `docker-compose` is as follows:
Expand All @@ -91,6 +154,61 @@ services:
ACCESS_CODE: lobe66
```
#### Crontab Auto-Update Script
Similarly, you can use the following script to update Lobe Chat automatically. When using `Docker Compose`, environment variables do not need additional configuration.

```bash
#!/bin/bash
# auto-update-lobe-chat.sh
# Set proxy (optional)
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
# Pull the latest image and store the output in a variable
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
# Check if the pull command executed successfully
if [ $? -ne 0 ]; then
exit 1
fi
# Check if the output contains a specific string
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
# If the image is already up to date, then do nothing
if [ $? -eq 0 ]; then
exit 0
fi
echo "Detected Lobe-Chat update"
# Remove old container
echo "Removed: $(docker rm -f Lobe-Chat)"
# Maybe you need to enter the directory where `docker-compose.yml` is located first
# cd /path/to/docker-compose-folder

# Run new container
echo "Started: $(docker-compose up)"

# Print the update time and version
echo "Update time: $(date)"
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"

# Clean up unused images
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
echo "Removed old images."
```

This script can also be used in Crontab, but make sure your Crontab can find the correct Docker command. It's recommended to use absolute paths.

Configure Crontab to execute the script every 5 minutes:

```bash
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
```

<!-- LINK GROUP -->

[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
Expand Down
Loading

0 comments on commit 5eb7bae

Please sign in to comment.