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
28a8820b
Commit
28a8820b
authored
May 07, 2025
by
何家明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除无意义代码
parent
93e23eba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
client.py
client/client.py
+1
-7
No files found.
client/client.py
View file @
28a8820b
...
...
@@ -188,12 +188,6 @@ class McpClient:
final_text
.
append
(
chat_completion_message
.
content
)
if
chat_completion_message
.
content
else
None
return
"
\n
"
.
join
(
final_text
)
async
def
handle_query
(
self
,
param
:
QueryParam
):
try
:
return
await
self
.
process_query
(
param
)
except
Exception
as
e
:
logger
.
exception
(
e
)
async
def
cleanup
(
self
):
"""Clean up resources."""
await
self
.
exit_stack
.
aclose
()
...
...
@@ -207,7 +201,7 @@ async def user_query(param: QueryParam):
if
not
client
.
connected
:
await
client
.
connect_to_server
()
await
client
.
read_mcp
()
result
=
await
client
.
handle
_query
(
param
)
result
=
await
client
.
process
_query
(
param
)
logger
.
info
(
f
"Final return: {result}"
)
return
result
except
Exception
as
e
:
...
...
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