Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bme-mcp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何家明
bme-mcp
Commits
edd83aff
Commit
edd83aff
authored
May 06, 2025
by
何家明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加千问3模型
parent
31a35b96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
api.py
api.py
+7
-0
config.yaml
config.yaml
+15
-7
No files found.
api.py
View file @
edd83aff
import
uvicorn
import
uvicorn
from
fastapi
import
FastAPI
from
fastapi
import
FastAPI
from
fastapi.middleware.cors
import
CORSMiddleware
from
QueryParam
import
QueryParam
from
QueryParam
import
QueryParam
from
config_read
import
config
from
config_read
import
config
...
@@ -7,6 +8,12 @@ from mcp_client import user_query
...
@@ -7,6 +8,12 @@ from mcp_client import user_query
app
=
FastAPI
(
name
=
[
"BME MCP服务"
])
app
=
FastAPI
(
name
=
[
"BME MCP服务"
])
if
config
.
get
(
"cors"
):
app
.
add_middleware
(
CORSMiddleware
,
allow_origins
=
config
.
get
(
"cors"
)
.
get
(
"allow_origins"
,
[
"*"
]),
allow_credentials
=
config
.
get
(
"cors"
)
.
get
(
"allow_credentials"
,
True
),
allow_methods
=
config
.
get
(
"cors"
)
.
get
(
"allow_methods"
,
[
"*"
]),
allow_headers
=
config
.
get
(
"cors"
)
.
get
(
"allow_headers"
,
[
"*"
]))
@
app
.
post
(
path
=
"/mcp/query"
,
description
=
"调用mcp工具查询"
)
@
app
.
post
(
path
=
"/mcp/query"
,
description
=
"调用mcp工具查询"
)
async
def
query
(
query_param
:
QueryParam
):
async
def
query
(
query_param
:
QueryParam
):
...
...
config.yaml
View file @
edd83aff
port
:
8000
port
:
8000
active
:
bme-qwen
2.5
-32b
active
:
bme-qwen
3
-32b
model
:
model
:
# 公司:deepseek-r1-671b
bme-deepseek-r1-671b
:
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
base_url
:
http://10.10.10.14:30000/v1
model_name
:
deepseek-r1
# 公司:qwen2.5-32b
# 公司:qwen2.5-32b
bme-qwen2.5-32b
:
bme-qwen2.5-32b
:
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
base_url
:
http://10.10.10.12:30070/v1
base_url
:
http://10.10.10.12:30070/v1
model_name
:
deepseek-r1
model_name
:
deepseek-r1
# 公司:qwen3-32b
bme-qwen3-32b
:
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
base_url
:
http://10.10.10.43:11434/v1
model_name
:
qwen3:32b
# 公司:deepseek-v3-0324-671b
# 公司:deepseek-v3-0324-671b
bme-deepseek-v3-0324-671b
:
bme-deepseek-v3-0324-671b
:
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
api_key
:
Tc7sY47hiU5d1LNGbJjGBfqfY13IE3khIc0uBvpJ11U
...
@@ -30,3 +30,11 @@ remote:
...
@@ -30,3 +30,11 @@ remote:
customer
:
customer
:
01ce2837d453c02f9b0e1828d0134e8e
:
bme
# 超级管理员,可以查看所有客户资源
01ce2837d453c02f9b0e1828d0134e8e
:
bme
# 超级管理员,可以查看所有客户资源
ef616aad53d3eddfb53ca71980421440
:
59
# 连云港华乐合金集团有限公司
ef616aad53d3eddfb53ca71980421440
:
59
# 连云港华乐合金集团有限公司
cors
:
allow_origins
:
-
"
*"
allow_credentials
:
true
allow_methods
:
-
"
*"
allow_headers
:
-
"
*"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment