Skip to content

Commit

Permalink
Sync with main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
phsontung committed Apr 12, 2024
2 parents 8501c98 + 98ad8e0 commit 18aff06
Show file tree
Hide file tree
Showing 400 changed files with 16,932 additions and 10,014 deletions.
109 changes: 49 additions & 60 deletions .env.example
@@ -1,116 +1,105 @@
# add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
#ACCESS_CODE=lobe66

# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
# CUSTOM_MODELS=model1,model2,model3
# ACCESS_CODE=lobe66

# Specify your API Key selection method, currently supporting `random` and `turn`.
# API_KEY_SELECT_MODE=random

# ---- only choose one from OpenAI Service and Azure OpenAI Service ---- #

########################################
############ OpenAI Service ############
######## Model Provider Service ########
########################################

### OpenAI ###

# you openai api key
OPENAI_API_KEY=sk-xxxxxxxxx

# use a proxy to connect to the OpenAI API
# OPENAI_PROXY_URL=https://api.openai.com/v1

########################################
######### Azure OpenAI Service #########
########################################
# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
# OPENAI_MODEL_LIST=gpt-3.5-turbo


### Azure OpenAI ###

# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
# use Azure OpenAI Service by uncomment the following line
# USE_AZURE_OPENAI=1

# The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
# AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# The endpoint you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
# OPENAI_PROXY_URL=https://docs-test-001.openai.azure.com
# AZURE_ENDPOINT=https://docs-test-001.openai.azure.com

# Azure's API version, follows the YYYY-MM-DD format
# AZURE_API_VERSION=2023-08-01-preview
# AZURE_API_VERSION=2024-02-01

########################################
############ ZhiPu AI Service ##########
########################################

#ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx
### Anthropic Service ####

########################################
########## Moonshot AI Service #########
########################################
# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# use a proxy to connect to the Anthropic API
# ANTHROPIC_PROXY_URL=https://api.anthropic.com

########################################
########### Google AI Service ##########
########################################

#GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
### Google AI ####

########################################
######### AWS Bedrock Service ##########
########################################
# GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#AWS_REGION=us-east-1
#AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx
#AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
######### Ollama AI Service ##########
########################################
### AWS Bedrock ###

# AWS_REGION=us-east-1
# AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx
# AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


### Ollama AI ####

# You can use ollama to get and run LLM locally, learn more about it via https://github.com/ollama/ollama

# The local/remote ollama service url
# OLLAMA_PROXY_URL=http://127.0.0.1:11434/v1

########### Mistral AI Service ##########
########################################
# OLLAMA_MODEL_LIST=your_ollama_model_names


### OpenRouter Service ###

# OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# OPENROUTER_MODEL_LIST=model1,model2,model3


### Mistral AI ###

# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
######### Perplexity Service ###########
########################################
### Perplexity Service ###

# PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
######### Anthropic Service ############
########################################
### Groq Service ####

# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
############ Groq Service ##############
########################################
#### 01.AI Service ####

# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
######### OpenRouter Service ##########
########################################
### TogetherAI Service ###

#OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#OPENROUTER_CUSTOM_MODELS=model1,model2,model3
# TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
######### 01.AI Service ##########
########################################
### ZhiPu AI ###

#ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx

########################################
######### TogetherAI Service ##########
########################################
### Moonshot AI ####

# MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

#TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

########################################
############ Market Service ############
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-close-require.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
actions: 'check-inactive'
token: ${{ secrets.GH_TOKEN }}
inactive-label: 'Inactive'
inactive-day: 30
inactive-day: 60

issue-close-require:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ secrets.BUN_VERSION }}
bun-version: ${{ secrets.BUN_VERSION }}

- name: Install deps
run: bun i
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ secrets.BUN_VERSION }}
bun-version: ${{ secrets.BUN_VERSION }}

- name: Install deps
run: bun i
Expand All @@ -23,3 +23,5 @@ jobs:

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
21 changes: 13 additions & 8 deletions .i18nrc.js
Expand Up @@ -23,20 +23,25 @@ module.exports = defineConfig({
'vi-VN',
],
temperature: 0,
modelName: 'gpt-3.5-turbo-1106',
splitToken: 1024,
modelName: 'gpt-3.5-turbo-0125',
splitToken: 2048,
experimental: {
jsonMode: true,
},
reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
markdown: {
entry: ['./README.zh-CN.md', './docs/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
// reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
entry: ['./README.zh-CN.md', './contributing/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
entryLocale: 'zh-CN',
entryExtension: '.zh-CN.md',
outputLocales: ['en-US'],
outputExtensions: (locale, { getDefaultExtension }) => {
if (locale === 'en-US') return '.md';
return getDefaultExtension(locale);
exclude: ['./contributing/_Sidebar.md', './contributing/_Footer.md', './contributing/Home.md'],
outputExtensions: (locale, { filePath }) => {
if (filePath.includes('.mdx')) {
if (locale === 'en-US') return '.mdx';
return `.${locale}.mdx`;
} else {
if (locale === 'en-US') return '.md';
return `.${locale}.md`;
}
},
},
});
9 changes: 9 additions & 0 deletions .seorc.cjs
@@ -0,0 +1,9 @@
const { defineConfig } = require('@lobehub/seo-cli');

module.exports = defineConfig({
entry: ['./docs/**/*.mdx'],
modelName: 'gpt-3.5-turbo-0125',
experimental: {
jsonMode: true,
},
});

0 comments on commit 18aff06

Please sign in to comment.