Skip to content

Commit

Permalink
Feat/0.3.4 (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit authored Aug 20, 2024
2 parents 5644dbe + b1e0d66 commit ed9fd5b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
# 安装 nltk
pip install nltk
python -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')"
mv /home/runner/nltk_data/taggers ./
mv /home/runner/nltk_data ./
cd ../../
- name: Build backend and push
Expand Down
2 changes: 1 addition & 1 deletion src/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENV PATH="${PATH}:/root/.local/bin"
COPY ./ ./

# Install NLTK data
RUN mv -f ./taggers /root/nltk_data/
RUN mv -f ./nltk_data /root/nltk_data/

RUN python -m pip install --upgrade pip && \
pip install shapely==2.0.1
Expand Down
7 changes: 4 additions & 3 deletions src/backend/bisheng/chat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ async def handle_gpts_message(self, message: Dict[any, any]):

# todo: 后续优化代码解释器的实现方案,保证输出的文件可以公开访问 ugly solve
# 获取minio的share地址,把share域名去掉, 为毕昇的部署方案特殊处理下
if gpts_tool_conf := self.gpts_conf.get('tools'):
if bisheng_code_conf := gpts_tool_conf.get("bisheng_code_interpreter"):
answer = answer.replace(f"http://{bisheng_code_conf['minio']['MINIO_SHAREPOIN']}", "")
for one in self.gpts_agent.tools:
if one.name == "bisheng_code_interpreter":
minio_share = settings.get_knowledge().get('minio', {}).get('MINIO_SHAREPOIN', '')
answer = answer.replace(f"http://{minio_share}", "")
answer_end_type = 'end'
# 如果是流式的llm则用end_cover结束, 覆盖之前流式的输出
if getattr(self.gpts_agent.llm, 'streaming', False):
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/pages/ModelPage/manage/CustomForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const modelProviders = {
label: "Base Url",
type: "text",
placeholder: "",
default: "https://open.bigmodel.cn/api/paas/v4/",
default: "https://spark-api-open.xf-yun.com/v1",
required: true,
key: "openai_api_base",
}
Expand Down
5 changes: 3 additions & 2 deletions src/frontend/src/pages/SkillPage/components/ToolSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ const ToolSet = forwardRef(function ToolSet({ onChange }, ref) {
if (configStr) {
const config = JSON.parse(configStr);
config.provider = config.azure_deployment ? 'azure' : 'openai';
const apiKey = config.openai_api_key
if (config.provider === 'openai') {
config.openai_api_key = config.openai_api_key;
config.openai_api_key = apiKey;
config.azure_api_key = ''
} else {
config.openai_api_key = '';
config.azure_api_key = config.openai_api_key;
config.azure_api_key = apiKey;
}
setFormData(config);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
import svgr from "vite-plugin-svgr";

// Use environment variable to determine the target.
const target = process.env.VITE_PROXY_TARGET || "https://bisheng.dataelem.com/";
const target = process.env.VITE_PROXY_TARGET || "http://192.168.106.120:3002";
const apiRoutes = ["^/api/", "/health"];

const proxyTargets = apiRoutes.reduce((proxyObj, route) => {
Expand Down

0 comments on commit ed9fd5b

Please sign in to comment.